啓動mysqld 報錯
[root@localhost ~]# service mysqld start
Starting MySQL.Logging to '/etc/mysql/localhost.localdomain.err'.
.... ERROR! The server quit without updating PID file (/etc/mysql/localhost.localdomain.pid).mysql
解決方法:sql
把/etc/my.cnf 文件 的datadir=/etc/mysql 改成 datadir=/data/mysql
啓動,不成功。less
查了錯誤日誌。
less /data/mysql/localhost.localdomain.errdom
按照網上的方法,運行命令以下:
[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/varide
啓動不成功。ui
我運行命令以下:
[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql日誌
啓動成功了。
[root@localhost mysql]# service mysqld start
Starting MySQL............ SUCCESS!server