MySQL Forums
Forum List  »  Install & Repo

Mysql 8.0.11 failed to start after changing datadir location
Posted by: Yoav Ben Moha
Date: April 24, 2018 01:12PM

Hi ,
I have took the following steps :
1) yum install mysql-community-server of version 8.0.11
2) start and stop the server
3) cp the default directory : /var/lib/mysql to new location
4) mv /var/lib/mysql to /var/lib/mysql_old
5) edit /etc/my.cfn
From:
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
to:
datadir=/mysql_data
socket=/mysql_data/mysql.sock
6) Restarting the server failed:

[]# systemctl start mysqld.service
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
[]# systemctl status mysqld.service
?— mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2018-04-24 21:58:20 IDT; 22s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 12198 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 12181 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 12198 (code=exited, status=1/FAILURE)
Status: "SERVER_BOOTING"
Error: 2 (No such file or directory)

Apr 24 21:58:20 systemd[1]: Starting MySQL Server...
Apr 24 21:58:20 systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE
Apr 24 21:58:20 systemd[1]: Failed to start MySQL Server.
Apr 24 21:58:20 systemd[1]: Unit mysqld.service entered failed state.
Apr 24 21:58:20 systemd[1]: mysqld.service failed.

Please advise , why the server is not starting from the new datadir

Thanks

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.