简体   繁体   English

mysql仅显示database()信息_模式数据库

[英]mysql show databases() only information_schema database

I use mysql -u root -p to login to mysql. 我使用mysql -u root -p登录到mysql。 Command show databases only shows information_schema database, and current_user is not root 命令show databases仅显示information_schema数据库,而current_user不是root用户

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
+--------------------+
2 rows in set (0.00 sec)

mysql> select current_user();
+----------------+
| current_user() |
+----------------+
| @localhost     |
+----------------+
1 row in set (0.00 sec)

You have no other databases - try to create one. 您没有其他数据库-尝试创建一个。

The current user is probably the anonymous user - by default MySQL ships with the following users, all having empty password ( https://dev.mysql.com/doc/refman/5.5/en/default-privileges.html ) 当前用户可能是匿名用户-默认情况下,MySQL随以下用户一起提供,所有用户都具有空密码( https://dev.mysql.com/doc/refman/5.5/en/default-privileges.html

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM