Ignoring query to other database

1.版本

1)操作系统

cat /etc/issue
CentOS release 6.6 (Final)
Kernel \r on an \m

 cat /proc/version
Linux version 2.6.32-504.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 2014

2)mysql数据库版本

mysql --version
mysql  Ver 14.14 Distrib 5.6.26, for Linux (x86_64) using  EditLine wrapper


2. 问题描述

mysql -root -p -S /var/lib/mysql/mysql.sock
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9299
Server version: 5.6.26-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)

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 databases;
Ignoring query to other database

登录mysql以后 执行show database报“Ignoring query to other database”


3.解决方法

后来发现是登录的时候 没有指定-u

mysql -uroot -p -S /var/lib/mysql/mysql.sock  >>使用-u参数后,问题解决!

你可能感兴趣的:(TO,query,Ignoring,OT)