MySQL只有information

  • 时间:
  • 浏览:0
  • 来源:大发彩神6合_大发神彩6合官方

| Database           |

+--------------------+

这上里能看得人哪此数据库是存在的,可是我权限的显示问題。在项目中url和用户名密码输入正确就里能连接上使用了。

+--------------------+

Welcome to the MySQL monitor.  Commands end with ; or \g.

affiliates. Other names may be trademarks of their respective

Server version: 5.6.27 MySQL Community Server (GPL)

mysql> show databases;

而且 连接数据库:mysql -u root -p

MBP:~ gegongxian$ sudo -s

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

bash-3.2# mysql -uroot -p

| information_schema |

Copyright (c) 1150, 2015, Oracle and/or its affiliates. All rights reserved.

Your MySQL connection id is 75

2 rows in set (0.00 sec)

affiliates. Other names may be trademarks of their respective

| mysql              |

+--------------------+

Enter password: 

mysql> show databases;

| Database           |

Oracle is a registered trademark of Oracle Corporation and/or its

| test               |

| performance_schema |

+--------------------+

Welcome to the MySQL monitor.  Commands end with ; or \g.

6 rows in set (0.00 sec)

mysql> 

Oracle is a registered trademark of Oracle Corporation and/or its

Your MySQL connection id is 76

只发现 information_schema,test数据库,并未mysql,performance_schema数据库。

Copyright (c) 1150, 2015, Oracle and/or its affiliates. All rights reserved.

| test               |

MBP:~ gegongxian$ mysql

| information_schema |

+--------------------+

owners.

Server version: 5.6.27 MySQL Community Server (GPL)

+--------------------+

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

应该是权限的问題,切换到root用户:sudo -s

mysql> 

安装好数据库时,连接MySQL,查看数据库时,发现里能了另一个 数据库。