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)
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.
如对本文有疑问, 点击进行留言回复!!
MySql添加新用户及为用户创建数据库和给用户分配权限方法介绍
Navicat出现无法远程连接MySql服务器问题的解决办法
网友评论