用了几天的MYSQL,开始好好的,有一天发现有个这样的数据库:
mysql> show databases;
+--------------------+
|
Database |
+--------------------+
| information_schema |
|
#mysql50#.ssh |
|
mysql |
| performance_schema |
+--------------------+
想删除这个数据库试过使用drop database "#mysql50#.ssh"和 drop database
#mysql50#.ssh;
mysql> drop database #mysql50#.ssh;
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '' at line 1
mysql> drop database "#mysql50#.ssh";
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '"#mysql50#.ssh"' at line 1
都报错,后来发现问题是mysql用户的$HOME目录下有目录.ssh导致的问题
$rm -rf .ssh后,问题解决
mysql> show databases;
+--------------------+
|
Database |
+--------------------+
| information_schema |
|
mysql |
| performance_schema |
+--------------------+