PHP程序员站--PHP编程开发平台
 当前位置:主页 >> PHP基础 >> 新手专区 >> 

Mysql错误:Ignoring query to other database解决方法

Mysql错误:Ignoring query to other database解决方法

来源:phperz.com  作者:phperz.com  发布时间:2011-11-30
Mysql错误:Ignoring query to other database解决方法 今天登陆mysql show databases出现Ignoring query to other database错误,又试了几个命令和sql全部提示Ignoring query to other database错误 错误如下: [root@vps ~]# mysql -hlocalhost -root -p Enter passwo

Mysql错误:Ignoring query to other database解决方法

今天登陆mysql show databases出现Ignoring query to other database错误,又试了几个命令和sql全部提示Ignoring query to other database错误

错误如下:
[root@vps ~]# mysql -hlocalhost -root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2267
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
Ignoring query to other database
mysql> show tables;
Ignoring query to other database

折腾了半天才发现原来是在连接mysql时没有"-u"参数导致的
[root@vps ~]# mysql -hlocalhost -root -p

重新连接mysql 加上-u参数 一且正常
[root@vps ~]# mysql -hlocalhost -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2291
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| dataxxx1           |
| dataxxx2           |
| dataxxx3           |
| dataxxx4           |
| mysql              |
| test               |
+--------------------+
13 rows in set (0.15 sec)


延伸阅读:
MYSQL错误:Can’t open file: ‘×××.MYI’
Mysql错误:Out of range value adjusted for column '字段' at row 1解决方法
Timeout error occurred trying to start MySQL Daemon错误解决办法
mysql服务无法启动1067错误解决
MySQL错误“Specified key was too long; max key length is 1000
Mysql错误: Got error 28 from storage engine 解决方法
Tags: mysql错误   mysql  
最新文章
推荐阅读
月点击排行榜
PHP程序员站 Copyright © 2007-2010,PHPERZ.COM All Rights Reserved 粤ICP备07503606号