MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| admin_default |
| information_schema |
| mysql |
| openvpn-admin |
| performance_schema |
| roundcube |
+--------------------+
6 rows in set (0.00 sec)
MariaDB [(none)]> drop database 'openvpn-admin';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''openvpn-admin'' at line 1
MariaDB [(none)]> drop database openvpn-admin;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-admin' at line 1
MariaDB [(none)]>
我被触发了。MariaDB + VESTACP我无法删除数据库为什么?怎么回事???
这取决于
您在架构名称中使用"-"。
您用反引号'或双引号"(如果您启用了ANSI_QUOTES sql_mode(引用标识符,因此它将与
drop database `openvpn-admin`;