mysql5.6数据库存放目录:/data/mysql/data

mysql5.6安装目录:/usr/local/mysql

 

[root@node1 mysql]# service mysqld start

Starting MySQL.The server quit without updating PID file (/data/mysql/data/node1.pid).   如何解决呢?

   首先排除了权限和设置目录管理组的问题

  [root@node1 mysql-5.6.10]# cd /usr/local/mysql/

  [root@node1 mysql]# cp ./support-files/my-default.cnf /etc/my.cnf 

 

vi /etc/my.cnf

[mysqld]     #添加

 

basedir = /usr/local/mysql

datadir = /data/mysql/data

port = 3306

socket = /tmp/mysql.sock
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/data/mysql/data/mysqld.pid
 
然后
[root@node1 mysql]# mkdir -p /data/mysql/data/node1.pid
[root@node1 mysql]# service mysqld start
Starting MySQL                                             [  OK  ]