Just trying out ubuntu server on my pc and have been testing some commands including mysql. I'm not sure why phpMyAdmin permitted me to create a database like this 'testing?db'. I'm trying to drop this database via SSH but I get this error:
mysql> show databases
    -> ;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| phpmyadmin         |
| testing?db         |
| testing_db         |
| wp                 |
+--------------------+
6 rows in set (0.00 sec)
mysql> DROP DATABASE testing?db;
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 '?db' at line 1
mysql>
I tried creating a database with a '?' in it and it also gives me syntax error. via ssh. so how do I remove this database?
The DROP DATABASE statement is used to drop an existing SQL database.
DROP is used to delete a whole database or just a table. The DROP statement destroys the objects like an existing database, table, index, or view.
Try:
DROP DATABASE `testing?db`;
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With