MySQL encountered the problem of igning query to other database
root@support~]#mysql-root-p--socket=/tmp/mysql.sock
Enterpassword:
WelcometotheMySQLmonitor.Commandsendwith;or\g.
YourMySQLconnectionidis5
Serverversion:5.6.22-logSourcedistribution
Copyright(c)2000,2011,Oracleand/oritsaffiliates.Allrightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/orits
affiliates.Othernamesmaybetrademarksoftheirrespective
owners.
Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.
mysql>showdatabases;
Ignoringquerytootherdatabase
mysql>showslavestatus\G
Ignoringquerytootherdatabase
->Ctrl-C--exit!
Aborted
Ignoring query to other database
I couldn’t figure it out, but later I found out the reason for the error. It turned out that the username was missing -u
Wrong: mysql -root -p –socket=/tmp/mysql.sock
Right: mysql -uroot -p –socket=/tmp/mysql.sock
[root@support~]#mysql-uroot-p--socket=/tmp/mysql.sock
Enterpassword:
WelcometotheMySQLmonitor.Commandsendwith;or\g.
YourMySQLconnectionidis6
Serverversion:5.6.22-logSourcedistribution
Copyright(c)2000,2011,Oracleand/oritsaffiliates.Allrightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/orits
affiliates.Othernamesmaybetrademarksoftheirrespective
owners.
Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.
mysql>showdatabases;
+--------------------+
|Database|
+--------------------+
|information_schema|
|_client|
|mfi_appstore|
|mfi_boss_admin|
|mysql|
|performance_schema|
|test|
+--------------------+
Similar Posts:
- [How to Solve ]Error 1130 (HY000) of MySQL authorized connection
- [Solved] Error report of inconsistent password format between low version and high version of MySQL
- ERROR 1040 (08004): Too many connections
- [Solved] Error 1054 (42s22) unknown column ‘password’ in ‘field list’ when updating the password of mysql5.7 or above
- mysql ERROR 1044 (42000): Access denied for user ‘
- Unknown system variable ‘storage_engine’
- How to Backup MySQL database regularly
- [Solved] MySQL Restart Error: Another MySQL daemon already running with the same UNIX socket
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
- Solution to the error of MySQL: unrecognized service (CentOS)