show database 没有mysql数据库,但是目录里有
linux centos 6.5
因为我想修改初始 root密码,
首先跳过权限启动的
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
然后这样,发现没有mysql数据库
[root@localhost tjw]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.1.33 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql;
ERROR 1049 (42000): Unknown database 'mysql'
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| ca |
+--------------------+
2 rows in set (0.00 sec)
下面是直接查看自己的数据,确实有mysql
[root@localhost data]# pwd
/data/mysql/data
[root@localhost data]# ls
ibdata1 ib_logfile0 ib_logfile1 localhost.localdomain.err localhost.localdomain.pid mysql test