检查权限 :
vim /etc/my.cnf
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
将这四处的权限设置为mysql可访问修改 如:
chmod mysql:mysql -R /var/lib/mysql
chmod mysql:mysql /var/lib/mysql/mysql.sock
chmod mysql:mysql /var/log/mysqld.log
chmod mysql:mysql /var/run/mysqld/mysqld.pid
innodb_buffer_pool_size = 128M