1

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.

yarek
  • 11,278
  • 30
  • 120
  • 219
  • You should also have changed the socket directory, and changed data dir 2 times (under `[client]` and `[mysqld]`) – Thomas G May 06 '18 at 08:16
  • there is only 1 datadir (in [mysqld] ) and socket directory points to an existing directory (socket = /var/run/mysqld/mysqld.sock) – yarek May 06 '18 at 12:45

0 Answers0