连接到 mysql 时,您似乎需要设置正确的编码。首先检查默认编码变量:
mysql> show variables like '%character%';
+--------------------------+-------------------------------------+
| Variable_name | Value |
+--------------------------+-------------------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/percona-server/charsets/ |
+--------------------------+-------------------------------------+
如果您看到类似的内容,则需要将会话设置切换为 UTF8
mysql> SET NAMES utf8;
Query OK, 0 rows affected (0.00 sec)
现在您只需将数据库输入 mysql 控制台即可删除带有任何 utf 字符的数据库