MySQL只有information

  • 时间:
  • 浏览:1

| information_schema |

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

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

bash-3.2# mysql -uroot -p

| performance_schema |

owners.

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

mysql> 

owners.

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

MBP:~ gegongxian$ sudo -s

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

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

Your MySQL connection id is 76

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

安装好数据库时,连接MySQL,查看数据库时,发现要能了有1个 数据库。

因此 连接数据库:mysql -u root -p

| test               |

Your MySQL connection id is 75

| mysql              |

| test               |

mysql> 

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

affiliates. Other names may be trademarks of their respective

| Database           |

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

2 rows in set (0.00 sec)

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

6 rows in set (0.00 sec)

mysql> show databases;

Server version: 5.6.27 MySQL Community Server (GPL)

MBP:~ gegongxian$ mysql

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

这要都可以 看了哪些数据库是指在的,随后权限的显示问題。在项目中url和用户名密码输入正确就要能连接上使用了。

affiliates. Other names may be trademarks of their respective

| information_schema |

| Database           |

mysql> show databases;

Server version: 5.6.27 MySQL Community Server (GPL)

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

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

Enter password: 

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

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

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