Pagoda panel: About MySQL "Tablespace for table **** exists" error

In MySQL, when using the create table script to create a table, the table you want to create obviously does not exist, but it prompts: Tablespace for table *** exists. Please DISCARD the table. Such errors are puzzling.

  • Solution
    In the operating system, enter the MySQL data directory and observe the data files. You will find that most of the files corresponding to the table names appear in pairs ( .ibd, .frm). But the problematic table lacks the *.frm file, and there is only a single file named "table name.ibd". Just delete this file.

Pagoda panel MySQL database management commands, including MySQL start, MySQL stop, MySQL restart, MySQL start and other commands, pagoda panel MySQL database installation directory, phpmyadmin installation directory and data storage directory:

Pagoda panel MySQL database management commands and directories

The pagoda panel MySQL database installation directory, phpmyadmin installation directory, data storage directory and mysql configuration file are as follows:

MySQL installation directory: /www/server/mysql
phpmyadmin installation directory: /www/server/phpmyadmin
data storage directory: /www/server/data
mysql configuration file:/etc/my.cnf

The MySQL database start, stop, restart and start commands are as follows:

MySQL start: /etc/init.d/mysqld start
MySQL stop: /etc/init.d/mysqld stop
MySQL restart: /etc/init.d/mysqld restart
MySQL start:/etc/init.d/mysqld reload

Guess you like

Origin blog.csdn.net/qq285679784/article/details/130164559