赞
踩
mysql> start slave; #开启复制
Query OK, 0 rows affected (0.00 sec)
mysql>SHOW SLAVE STATUS\G #查看主从复制是否配置成功
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.8.201
Master_User: xiaokai
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000003
Read_Master_Log_Pos: 5383
Relay_Log_File: xiaokai-PC-relay-bin.000002
Relay_Log_Pos: 1028
Relay_Master_Log_File: mysql-bin.000003
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
mysql>stop slave;#先停止复制线程
mysql> set GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
mysql> slave start;#再开启复制
1)
ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.
遇到这个问题,可能是因为客户端mysql和服务端版本不一致,比如mysql-5.5.41连接5.7.12。
2.
TIMESTAMP with implicit DEFAULT value is deprecated
执行MySQL的“bin/mysqld --initialize --user=mysql”时报的错误。
原因是从MySQL 5.6版本开始,timestamp的默认值已被标为deprecated,即如果类型为timestamp的字段,如果没有明确声明默认值为NULL,则默认为NOT NULL。如果设置timestamp字段为NULL,则自动存储当前的timestamp。
3.
Can't find error-message file '/usr/local/mysql/share/errmsg.sys'
4)
Can't find error-message file '/usr/local/mysql/share/errmsg.sys'
对于错误:
Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
5)
Can't connect to local MySQL server through socket
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
export MYSQL_HOME=/usr/local/mysql
export PATH=$MYSQL_HOME/bin:$PATH
export MANPATH=$MYSQL_HOME/man:$MANPATH
6)
ERROR 3021 (HY000): This operation cannot be performed with a running slave io thread;run STOP SLAVE IO_THREAD FOR CHANNEL '' first.
7)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
pidof mysqld
/cmdline””查看mysqld参数“–socket”的值,比如可能是“/var/lib/mysql/mysql.sock”。8)
mysqld: Table 'mysql.plugin' doesn't exist
2016-05-18T03:33:56.235882Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
9)
2016-05-18T03:41:02.970764Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
10)
2016-05-18T03:44:42.731483Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。