mysql wont start up after changing datadir and changing it back

Discussion in 'Server Operation' started by MRGanboo, Feb 12, 2016.

  1. MRGanboo

    MRGanboo New Member

    mysql wont start anymore after i tried to move datadir from /var/lib/mysql to /home/mysql i chowned the folder and edit /etc/mysql/my.cnf and also yes the file is 0755 but i get this error when ever trying to start it up

    Code:
    ● mysql.service - LSB: Start and stop the mysql database server daemon
       Loaded: loaded (/etc/init.d/mysql)
       Active: failed (Result: exit-code) since Fri 2016-02-12 15:55:09 CET; 1h 44min ago
      Process: 767 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
    
    Feb 12 15:55:09 ns3317389.ip-37-59-14.eu mysql[767]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
    Feb 12 15:55:09 ns3317389.ip-37-59-14.eu systemd[1]: mysql.service: control process exited, code=exited status=1
    Feb 12 15:55:09 ns3317389.ip-37-59-14.eu systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
    Feb 12 15:55:09 ns3317389.ip-37-59-14.eu systemd[1]: Unit mysql.service entered failed state.
    
    and the log in /var/log/mysql says

    i cant post the log bcs its too long and im not allowed to post links
     
  2. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    You can try starting mysqld on cli like $bin/mysqld_safe --user=mysql
    to see the actual issue. Without the corresponding error message it's more guessing than solving your issue :/

    Are any security mechanisms in place like AppArmor or selinux which might prevent mysqld / mysql-user to read the data?
     

Share This Page