我们遇到磁盘故障,并设法恢复/var/lib/mysql
目录。我设置了一个新服务器并将mysql/
目录提取回/var/lib/mysql
。奇怪的是,我注意到桌子丢了。所以,我以为我会创建它:mysql> create table auth_user(id int(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY);
当我这样做时,我收到此错误:
ERROR 1050 (42S01): Table 'cion_crew.auth_user' already exists
show tables
的输出不包含auth_user
,它怎么说它存在?见这里:
mysql> show tables;
+----------------------------+
| Tables_in_cion_crew |
+----------------------------+
| accounts_userprofile |
| auth_group |
| auth_group_permissions |
| auth_permission |
| auth_user_groups |
| auth_user_user_permissions |
| django_admin_log |
| django_content_type |
| django_migrations |
| django_session |
| search_searchterm |
| skills_creditoptions |
| skills_skills |
+----------------------------+
13 rows in set (0.00 sec)
我没有在show table中看到它。当然,我试图做到以下几点:
mysql> desc cion_crew.auth_user;
ERROR 1146 (42S02): Table 'cion_crew.auth_user' doesn't exist
mysql> desc auth_user;
ERROR 1146 (42S02): Table 'cion_crew.auth_user' doesn't exist
mysql>
有谁知道这里发生了什么,我该怎么办?我想带回那个存在/不存在的auth_user
表
/var/lib/mysql
由用户mysql