MySQL Database with Hash Sign: Difference between revisions
From Leo's Notes
This page was last edited on 20 July 2013, at 19:35.
Created page with " One curious thing which I noticed on a MySQL server was a database named '#mysql50#.ssh' <syntaxhighlight lang="bash" line start="1" enclose="div"> mysql> show databases; +-..." |
No edit summary |
||
| Line 23: | Line 23: | ||
It turns out, any directories on the MySQL user's home directory will be displayed as a database. And since I had mysql SSH to servers as part of a trigger, the .ssh directory got created for the known hosts file, which ended up on my database list. | It turns out, any directories on the MySQL user's home directory will be displayed as a database. And since I had mysql SSH to servers as part of a trigger, the .ssh directory got created for the known hosts file, which ended up on my database list. | ||
One solution is to move the directory and change the home directory for MySQL to something else. | |||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:MySQL]] | [[Category:MySQL]] | ||
Revision as of 19:35, 20 July 2013
One curious thing which I noticed on a MySQL server was a database named '#mysql50#.ssh'
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| #mysql50#.ssh |
| host |
| mysql |
+--------------------+
4 rows in set (0.00 sec)
You can't drop it either:
mysql> drop database `#mysql50#.ssh`;
ERROR 1102 (42000): Incorrect database name '#mysql50#.ssh'
It turns out, any directories on the MySQL user's home directory will be displayed as a database. And since I had mysql SSH to servers as part of a trigger, the .ssh directory got created for the known hosts file, which ended up on my database list.
One solution is to move the directory and change the home directory for MySQL to something else.