我把一个数据库移动到/var/lib/mysql的目录下,那是缺省数据库目录,大家来看下我下面的操作:
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| proc |
| procs_priv |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
17 rows in set (0.00 sec)mysql> use ietm1
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> show tables;
+-----------------+
| Tables_in_ietm1 |
+-----------------+
| question |
| questionall |
| treeview |
| user |
+-----------------+
4 rows in set (0.00 sec)mysql> select * from user;
ERROR 1033 (HY000): Incorrect information in file: './ietm1/user.frm'
mysql> 我看了日志文件,同样是说我是不正确的资料,为什么呢,为什么不能看到数据呢?是不是直接移动过去是不行的呢?望能解决!
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| proc |
| procs_priv |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
17 rows in set (0.00 sec)mysql> use ietm1
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> show tables;
+-----------------+
| Tables_in_ietm1 |
+-----------------+
| question |
| questionall |
| treeview |
| user |
+-----------------+
4 rows in set (0.00 sec)mysql> select * from user;
ERROR 1033 (HY000): Incorrect information in file: './ietm1/user.frm'
mysql> 我看了日志文件,同样是说我是不正确的资料,为什么呢,为什么不能看到数据呢?是不是直接移动过去是不行的呢?望能解决!
直接COPY是有条件的
一两句话说不清楚。