MySQL table doesn’t exist

linuxMySQL

What I did before the disaster was:

vi /etc/my.cfg

I added

innodb_buffer_pool_size=4G
innodb_buffer_pool_instance=2
innodb_read_io_threads=12
innodb_write_io_threads=12
innodb_io_capacity=300
innodb_log_file_size=128M

and after that

$ service mysql stop
$ cd /var/lib/mysql
$ rm -f ibdata1 ib_logfile*
$ service mysql start

I receive ERROR 1146 (42S02): Table 'db.table' doesn't exist for every table.

My site is down, database backup does not help.

Best Answer

rm -f ibdata1 ib_logfile*

Well there's your problem. You deleted your INNODB table space.

You'll need to restore from backup.

Just curious: where did you get the idea that you should remove those files?