mysql Ignoring query to other database

mysql 碰到了Ignoring query to other database问题:

[email protected] ~]# mysql -root -p --socket=/tmp/mysql.sock
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.22-log Source distribution
Copyright (c) 2000, 2011, 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 slave status\G
Ignoring query to other database
    -> Ctrl-C -- exit!
Aborted

Ignoring query to other database

百思不得其解,后面发现了错误原因。竟然是用户名漏了  -u,真是小糊涂。

错误:mysql -root -p --socket=/tmp/mysql.sock

正确:mysql -uroot -p --socket=/tmp/mysql.sock

[[email protected] ~]# mysql -uroot -p --socket=/tmp/mysql.sock
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.6.22-log Source distribution
Copyright (c) 2000, 2011, 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;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| _client            | 
| mfi_appstore       | 
| mfi_boss_admin     | 
| mysql              | 
| performance_schema | 
| test               | 
+--------------------+
时间: 2024-08-11 04:15:01

mysql Ignoring query to other database的相关文章

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

今天登陆mysql show databases出现Ignoring query to other database错误,又试了几个命令和sql全部提示Ignoring query to other database错误 错误如下: D:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -rootWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection

MySQL出现Ignoring query to other database的问题

今天使用mysql的时候,输入任意一条命令都会出: Ignoring query to other database 这条错误信息,很是奇怪.后来才发现是登录数据库时,少了个-u的参数.. 正确的命令是: mysql -uroot -p 我输入的是: mysql -root -p 加上-u就可以了 MySQL出现Ignoring query to other database的问题

mariadb报Ignoring query to other database解决方法

问题描述,今天登陆mariadb时,发现任何sql语句不能执行,报以下错误 MariaDB [(none)]> show databases; Ignoring query to other database MariaDB [(none)]> show tables; Ignoring query to other database MariaDB [(none)]> select database(); Ignoring query to other database 折腾了好长时间

MySQL报错:Ignoring query to other database的解决办法

原因是在登陆数据库的时候,缺少了-u参数 错误截图:修正截图: 原文地址:http://blog.51cto.com/13587182/2074003

Mysql slow query log

一.概念部分:  顾名思义,慢查询日志中记录的是执行时间较长的query,也就是我们常说的slow query,通过设--log-slow-queries[=file_name]来打开该功能并设置记录位置和文件名,默认文件名为hostname-slow.log,默认目录也是数据目录.     慢查询日志采用的是简单的文本格式,可以通过各种文本编辑器查看其中的内容.其中记录了语句执行的时刻,执行所消耗的时间,执行用户,连接主机等相关信息.MySQL还提供了专门用来分析满查询日志的工具程序mysql

memcached和MySQL的query cache相比

把memcached引入应用中,还是需要不少工作量的.MySQL有个使用方便的query cache,可以自动地缓存SQL查询的结果,被缓存的SQL查询可以被反复地快速执行.Memcached与之相比,怎么样呢?MySQL的query cache是集中式的,连接到该query cache的MySQL服务器都会受益. * 当您修改表时,MySQL的query cache会立刻被刷新(flush).存储一个memcached item只需要很少的时间,但是当写操作很频繁时,MySQL的query c

A SQL Query to find database files

1 SELECT 2 DB_NAME(mf.database_id) AS databaseName, 3 name as File_LogicalName, 4 case 5 when type_desc = 'LOG' then 'Log File' 6 when type_desc = 'ROWS' then 'Data File' 7 Else type_desc 8 end as File_type_desc 9 ,mf.physical_name 10 ,num_of_reads 1

MySQL 之 query cache

早上一打开网站,就看到了Percona官网发布的最新的关于 mysql query cache的文章: https://www.percona.com/blog/2015/08/07/mysql-query-cache-worst-enemy-best-friend/ 还有一篇对其评论的文章: https://blog.gslin.org/archives/2015/08/07/5906/percona-%E5%B0%8D-mysql_query_cache-%E7%9A%84%E6%B8%AC

MySQL Error Query database. Causejava.sql.SQLException: Incorrect key file for table ‘/tmp/#sql_181c

1,开发人员截图给我,后台报错如下: Error Query database. Causejava.sql.SQLException: Incorrect key file for table '/tmp/#sql_181c_0.MYI'; tryto repair it; 分析,这种,大多数情况是tmp临时表空间不足,所以执行比较复杂的sql或者执行大表关联的时候,需要临时表资源较多,如果临时表资源少的话,就会保错. 2,看看tmp_table_size值 mysql> show varia