为什么我的12.04安装mysql后,show databases;看不到mysql databse??

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
xusiwei1236
帖子: 4
注册时间: 2011-10-29 22:10

为什么我的12.04安装mysql后,show databases;看不到mysql databse??

#1

帖子 xusiwei1236 » 2012-12-14 20:34

大家用12.04有没有遇到这样的问题?
我的默认用户是administrator
用apt-get安装mysql没有切换为root,用的就是这个用户,
用这个用户也能直接登录mysql,如下:

administrator@ubuntu:/usr/local$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 162
Server version: 5.5.28-0ubuntu0.12.04.3 (Ubuntu)

Copyright (c) 2000, 2012, 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 |
| test |
+--------------------+
2 rows in set (0.00 sec)


“MySQL stores accounts in the user table of the mysql database. ” 没有 mysql database我怎么修改帐号,密码阿?????????????
而且更加奇怪的是我用administrator登录后看也看不到root用户,但是有administrator:
mysql> select user();
+-------------------------+
| user() |
+-------------------------+
| administrator@localhost |
+-------------------------+
1 row in set (0.19 sec)

求解~~~~~~~~~~~~~~~~~~
xusiwei1236
帖子: 4
注册时间: 2011-10-29 22:10

Re: 为什么我的12.04安装mysql后,show databases;看不到mysql databse??

#2

帖子 xusiwei1236 » 2012-12-14 21:31

我已经解决了,原来必须要切换到root用户登录才行 :em05
apt-get 安装的 mysql 默认的root密码和系统的root密码相同
回复