Ignoring query to other database 解决方法
今天登陆服务器,查看数据同步情况,出现逗比的问题一个。
Welcome to the MySQL monitor. Commands end with ; or \g.
Server version: 5.5.44-0ubuntu0.14.04.1-log (Ubuntu)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show slave status\G;
Ignoring query to other database
Ignoring query to other database
mysql> show database;
Ignoring query to other database
mysql>
show databases出现Ignoring query to other database错误,又试了几个命令和sql全部提示Ignoring query to other database错误。
折腾了半天才发现原来是在连接mysql时没有"-u"参数导致的。我一时手滑,写成:
mysql -root -p
少了个“u”,正确写法如下:
mysql -u root -p
重新连接mysql 加上-u参数 一切正常。
凡事都不能马虎啊。。。