My server disk /var is full I followed the instructions described in : How to change MySQL data directory?
I did that: (debian server)
- stop mysql
- copy /var/lib/mysql to /data/lib/mysql (with same rights)
- change the config file (and put datadir to /data/lib/mysql)
- restart mysql
But mysql is not able to start any more (If I do change back the datadir, it does restart)
mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql) Active: failed (Result: exit-code) since Sun 2018-05-06 09:22:58 CEST; 19s ago Process: 23233 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS) Process: 24059 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)mysql[24059]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed! systemd[1]: mysql.service: control process exited, code=exited status=1 systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon. systemd[1]: Unit mysql.service entered failed state.