Error 500 Failed to connect to the panel database | Multicraft login error

Discussion in 'Systems Administration' started by Troy, Dec 22, 2016.

  1. I just installed Multicraft on my Ubuntu 16.04 server. I am getting the following error when trying to login to the panel:

    Error 500
    Failed to connect to the panel database.
    The error message is: CDbConnection failed to open the DB connection.

    I know for sure it's not able to connect to the database. Not sure as of why this is.

    I restarted the server and now I got this error. I started the daemon but still not connecting. I attempted to restart apache but still nothing. I'm stuck and don't know where to go from here.
     
  2. Check your panel logs: cd /where/your/panel/is/located/protected/runtime/ and check application.log
     
    1. 2016/12/22 16:18:35 [error] [exception.CDbException] [User , IP_ADDRESS_HERE] SQLSTATE[HY000] [1045] Access denied for user 'multicraft_panel'@'localhost' (using password: YES)
    2. 2016/12/22 16:18:35 [error]
    Check your MySQL user
     
  3. Where would I go to see this? I'm really lost at this point.
     
  4. Basically, you need to make sure the user: multicraft_panel has access to write data in the database. As in it needs the permissions. Find the user in phpmyadmin and grant it full permission to make sure that's the issue. If it is the issue, changes the permissions to whatever works for you, but also allows your multicraft to save DB stuff.
     
  5. It seems to be working now. Instead of it running mysql it's trying to run SQLite.

    "

    12.23 22:09:10 ERROR Database connection failed.
    12.23 22:09:10 WARNING Setting daemon info failed, please update your database.
    12.23 22:09:10 CRITICAL Failed to connect to SQLite: unable to open database fil e
    "

    I'm not sure how to change it from SQLite to Mysql. My database is MySQL.
     
  6. Open your multicraft.conf & find the DB settings. Should look something like this. (Of course yours should say SQLite where "mysql" is but you should change it to "mysql". And the "host" will be your number ip. And your dbname= should be your database name.
    database = mysql:host=1.2.3.4;dbname=multicraft_daemon
    dbUser = *your MySQL user*
    dbPassword = *your MySQL password*
     
  7. If this is a local server and you are using it for yourself and don't plan to expand to other server I'd suggest just using sqlite for your database. There is really no need for MySQL unless you have multiple daemons setup running off of one panel.
     
  8. MySQL is more efficient and if you are going to expand later with more machines you have to resetup when you have SQLite
     
  9. Hence why I said for him to use sqlite if he wasn't planning to expand :p
     
  10. I am using this on a ubuntu server. I plan to expand eventually.
     
  11. Well if you are planning on expanding then I'd stick with using mysql :p As another user pointed out it is informing you that you have a bad password for mysql. You have two options. Either reset the mysql password for the user you are using. Or if you are unable to do that rerun the setup script and make a new user.
     
  12. For some odd reason when I try to restart the daemon I get the following error:
    "
    Loading configuration from /home/minecraft/multicraft/multicraft.conf
    Shutting down running Daemon (pid 1760)...
    The running Daemon with pid 1760 did not shut down in time, please re-run thiommand.
    "
    Not quite sure why it won't shut down without me having to reboot the server.
     
  13. If you are unable to shut down things properly that might be a user permissions error. Are you running commands on a user account who has permissions to all the folders. Are you running your commands as sudo?
     
    • Informative Informative x 1
  14. I fixed it, it now shuts down. I'm just having trouble getting the jar files to work now. I attempted to put in craftbukkit 1.11.2 and I made the .conf file the same as the craftbukkit-1.11.2.conf
    Not quite sure where to go from here.