1 ERROR 1045 (28000): Access denied for user 问题,查了好久,发现是有为null的user,删除对应的记录就好了
[root@db-181 ~]# mysql -u rep -p -h db-183
Enter password:
ERROR 1045 (28000): Access denied for user 'rep'@'db-181' (using password: YES)
[root@db-181 ~]# mysql -u root -p -h db-183
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'db-181' (using password: YES)
mysql> select user,host from mysql.user;
+--------+------------+
| user | host |
+--------+------------+
| dba | % |
| rep | % |
| sbtest | % |
| root | 127.0.0.1 |
| root | ::1 |
| | db-181 |
| root | db-181 |
| root | db-182 |
| root | db-183 |
| | localhost |
| rep | localhost |
| root | localhost |
+--------+------------+
13 rows in set (0.00 sec)
mysql> delete from mysql.user where user='' and host='db-181';
Query OK, 1 row affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
2 A question about using MHA "purge_relay_logs script" :
Thanks for the MHA and she is very useful to us .
But i have a question about using "purge_relay_logs script".
IN the "Requirements and Limitations" you write :
It is recommended invoking cron at different time between slaves.
If all slaves invoke purge_relay_logs at the same time, none of the slave might not have necessary relay log events at crash.
It is no problem in most cases. But in an extreme scenario ,the Latest Slave has just switched relay log .
After the point if i execute purge_relay_logs script. and the master crash at the same time.
But other slaves haven't the lasted relay log (have some gap ) and the dead master is unreachable via SSH.
In the scenario , MHA(0.53) can recover the cluster or not ?
我们目前的想法是relay log通过我们的定时任务进行清除,同时维护relay index。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/758322/viewspace-722418/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/758322/viewspace-722418/