mysql常见问题集锦
2017-11-29 11:29
288 查看
登录时提示密码错误
# mysql -uroot -pEnter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
通过免密码登录的方式更改密码
在/etc/my.cnf文件的最后添加一行“skip-grant-tables”,修改完密码后,再把此行配置注释或删除
>update user set password=password('1234qwer') where user='root';
mysql5.7需要用下面的SQL修改密码
>update user set authentication_string=password('1234qwer') where user='root';
克隆mysql做主从配置
show slave status \G;Slave_IO_Running: No
Slave_SQL_Running: Yes
查看后台/var/log/mysqld.log
2017-11-29T03:45:58.264849Z 8 [Note] Error reading relay log event for channel '': slave SQL thread was killed
2017-11-29T03:46:43.051822Z 9 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START
SLAVE Syntax' in the MySQL Manual for more information.
2017-11-29T03:46:43.056257Z 9 [Note] Slave I/O thread for channel '': connected to master 'backup@192.168.1.106:3306',replication started in log 'FIRST' at position 4
2017-11-29T03:46:43.078007Z 10 [Warning] Slave SQL for channel '': If a crash happens this configuration does not guarantee that the relay log info will be consistent, Error_code: 0
2017-11-29T03:46:43.079075Z 10 [Note] Slave SQL thread for channel '' initialized, starting replication in log 'FIRST' at position 0, relay log './CentOS65M2-relay-bin.000001' position: 4
2017-11-29T03:46:43.089291Z 9 [ERROR] Slave I/O for channel '': Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work. Error_code: 1593
2017-11-29T03:46:43.089373Z 9 [Note] Slave I/O thread exiting for channel '', read up to log 'FIRST', position 4
在mysql中,重新生成一个uuid,
mysql>select uuid();
根据/etc/my.cnf的配置信息,datadir=/var/lib/mysql
找到/var/lib/mysql/auto.cnf,将其中server-uuid的值,用新生成的uuid代替,重启mysqld服务
参考:
http://blog.csdn.net/skywalker_leo/article/details/47274441 http://blog.csdn.net/better_space/article/details/53523353
/,r的
相关文章推荐
- Mysql常见问题集锦
- Mysql常见问题集锦
- 【MySql】常见问题集锦
- MySQL常见问题集锦解答及技巧
- CentOS查服务器配置、关防火墙、改DNS、mysql配置问题集锦、CentOS编译PHP5.6常见错误
- MySQL常见问题集锦解答及技巧
- mysql安装时出现各种常见问题的解决方法
- 【CSS】常见问题集锦
- Mysql 常见问题汇总
- SSH常见问题集锦—
- 在Windows上安装Python+MySQL 的常见问题及解决方法
- mysql 常见问题收集
- Visual C#.NET编程 常见问题集锦
- Mysql 常见问题
- mysql主从备份配置及常见问题
- Linux 安装 MySQL 以及 一些常见问题解决方案
- linux配置mysql常见问题
- Web GIS 涉及到的常见Ajax框架 及 问题处理集锦
- Linux运维常见问题解决集锦【转】
- MySQL:常见使用问题