mysql資料庫中出現#mysql50#.ssh處理方法
阿新 • • 發佈:2019-02-18
有一天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 : 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 : 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導致的問題。
su - mysql
pwd
ll .ssh
$rm -rf .ssh後,問題解決
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
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 : 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 : 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導致的問題。
su - mysql
pwd
ll .ssh
$rm -rf .ssh後,問題解決
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+