处理PXC初始化和启动报错三例

报错一:pxc初始化报错
-bash-4.1$ cd /usr/local/mysql
-bash-4.1$ ./scripts/mysql_install_db
./bin/my_print_defaults: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory
FATAL ERROR: Neither host 'mvxl0782' nor 'localhost' could be looked up with
./bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option

解决方法:
1.检查openssl是否安装
rpm -qa|grep openssl
若没有安装,执行yum install openssl openssl-devel
2.若有安装,建立软链接文件
ln -sf /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.6
ln -sf /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.6

 

报错二:pxc第一个节点启动报错
-bash-4.1$ /etc/init.d/mysql bootstrap-pxc
Bootstrapping PXC (Percona XtraDB Cluster)MySQL (Percona XtraDB Cluster) is not running, but PID file exists[FAILED]

解决:
删除pid文件
cd /data/mysql/mysql_3306/data
rm -f mvxl0782.pid

 

报错三:pxc其它节点启动报错
-bash-4.1$ /etc/init.d/mysql start
Starting MySQL (Percona XtraDB Cluster)..........The server quit without updating PID file (/data/mysql/mysql_3306/data/mvxl0784.pid).[FAILED]
MySQL (Percona XtraDB Cluster) server startup failed![FAILED]

查看error log:
2016-06-22 17:27:49 10996 [ERROR] WSREP: Local state seqno (8) is greater than group seqno (7): states diverged. Aborting to avoid p
otential data loss. Remove '/data/mysql/mysql_3306/data//grastate.dat' file and restart if you wish to continue. (FATAL)
         at galera/src/replicator_str.cpp:state_transfer_required():33
2016-06-22 17:27:49 10996 [Note] WSREP: applier thread exiting (code:8)
2016-06-22 17:27:49 10996 [ERROR] Aborting

2016-06-22 17:27:51 10996 [Note] WSREP: Service disconnected.
2016-06-22 17:27:51 10996 [Note] WSREP: rollbacker thread exiting
2016-06-22 17:27:52 10996 [Note] WSREP: Some threads may fail to exit.
2016-06-22 17:27:52 10996 [Note] Binlog end
2016-06-22 17:27:52 10996 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

Error in my_thread_global_end(): 1 threads didn't exit
160622 17:27:57 mysqld_safe mysqld from pid file /data/mysql/mysql_3306/data/mvxl0783.pid ended


解决:
删除grastate.dat,重新启动mysql即可。

 

 

 

你可能感兴趣的:(mysql高可用)