mysql> show databases;
+ — — — — — — — — — — — — — — — — — — — — +
| Database |
+ — — — — — — — — — — — — — — — — — — — — +
| information_schema |
| mysql |
| performance_schema |
| test |
+——————–+
mysql> use test
mysql> create table t1(id int);
ERROR 1813 (HY000): Tablespace for table ‘`test`.`t1`’ exists. Please DISCARD the tablespace before IMPORT.
mysql> alter table t1 DISCARD tablespace;
ERROR 1146 (42S02): Table ‘test.t1’ doesn’t exist
mysql> create database gg;
mysql> show databases;
+ — — — — — — — — — — — — — — — — — — — — +
| Database |
+ — — — — — — — — — — — — — — — — — — — — +
| information_schema |
| gg |
| mysql |
| performance_schema |
| test
| + — — — — — — — — — — — — — — — — — — — — +
mysql> use gg
Database changed
mysql> create table t1(id int);
go to the database gg
cp-a t1.frm.. /test/t1.frm
mysql> select * from t1;
ERROR 1146 (42S02): Table ‘test.t1’ doesn’t exist
mysql> Alter TABLE T1, TABLESPACE;
Query OK, 0 rows affected, 2 warnings (0.01 SEC)
goes to database gg
cp -a t1.ibd .. /test/t1.ibd
mysql> use test
mysql> select * from t1;
ERROR 1814 (HY000): Tablespace has been discarded for table ‘t1’
mysql> Alter TABLE T1 Import TABLESpace;
Query OK, 0 rows affected, 1 warning (0.04 SEC)
mysql> select * from t1;
Empty set (0.00 SEC)
Read More:
- MySQL – ERROR 1146 (42S02): Table ‘mysql.user’ doesn’t exist
- Error 1146 (42s02): table ‘database name. Table name’ doesn’t exist ‘
- [SQLITE_ Error] SQL error or missing database (table users already exists)
- Error 1051 (42s02): unknown table ‘…’
- MySQL partitions the existing tables of the data table
- 【Exception】mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table…
- mysql Table ‘performance_ schema.session_ Variables’ doesn’t exist solution
- mysql Error Code: 1022. Can’t write; duplicate key in table `xxx`
- Insufficient table space ORA-00604 unable to extend table SYS.AUD by 8192
- MySQL error: can’t create table ‘..’( errno:150 )Solutions
- MySQL ERROR 1054 (42S22): Unknown column’password’ in’field list’ error
- Get connection timeout retry: 1 MySQL errorcode 0, state 08s01 docker container accessing MySQL container is very slow and sometimes interrupted
- SQL exception handling – MySQL error 1005 (HY000): can’t create table ‘TMP’ (errno: 13)
- About error 1005 (HY000) in MySQL: can’t create table ‘_______ ‘(errno: 150) fool’s plan
- MySQL error operation should contain 1 column (s)
- MySQL error 1054 (42s22) unknown column ‘password’ in ‘field list’
- Mysql reports an error Operand should contain 1 column(s)
- An error was reported in the process of importing the table from mysql5.7: [err] 1067 – invalid default value for ‘***‘
- MySQL password setting error message: error 1054 (42s22): unknown column ‘password’ in ‘field list’
- 1093 – You can’t specify target table ‘table’ for update in FROM clause