################################mysql
主备数据库
http://www.cnblogs.com/hustcat/archive/2009/12/19/1627525.html
SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘ceshi160’);
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON . TO repl@’192.168.0.%’ IDENTIFIED BY ‘ceshi160’;
grant all privileges on cmm.* to ‘cmmw’@’192.168.0.%’ identified by ‘cmmw123’;
grant select on cmm.* to ‘cmmr’@’192.168.0.%’ identified by ‘cmmr123’;
flush privileges;
grant select on . to ‘monitor’@’192.168.30.21’ identified by ‘monitor’;
flush privileges;
grant all privileges on . to ‘monitor’@’192.168.30.21’ identified by ‘monitor’;
flush privileges;
Starting MySQL (Percona Server). ERROR! The server quit without updating PID file (/data/mysqldata/localhost.localdomain.pid).
google了下 ,问题可能的原因有多种,具体什么原因最好的办法是先查看下错误日志:
1.可能是/usr/local/mysql/data/rekfan.pid文件没有写的权限
解决方法 :给予权限,执行 “chown -R mysql:mysql /var/data” “chmod -R 755 /usr/local/mysql/data” 然后重新启动mysqld!
2.可能进程里已经存在mysql进程
解决方法:用命令“ps -ef|grep mysqld”查看是否有mysqld进程,如果有使用“kill -9 进程号”杀死,然后重新启动mysqld!
3.可能是第二次在机器上安装mysql,有残余数据影响了服务的启动。
解决方法:去mysql的数据目录/data看看,如果存在mysql-bin.index,就赶快把它删除掉吧,它就是罪魁祸首了。本人就是使用第三条方法解决的 !http://blog.rekfan.com/?p=186
[……]阅读全文