[英]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.