|
|
|
We're in the process of changing our InnoDB databases to file-per-table. So, I went ahead and backed up all databases, deleted that data and log files, re-created the MySQL database from the script, then restored all the user databases. Everything is fine, except of course I'm missing all the users. So my questions are:
- I had to create the new mysql database in order to get the server to start without error ([ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist). After creating a new mysql db from the script, should I have first restored the old mysql database, then the user databases?
- Somewhere I saw that I still needed to create the InnoDB shared tablespace. What does InnoDB use this for? For the production system, I need to estimate what size to start with.
- I restored the original mysql database as mysql_old, so I have access to the old grant tables. Any suggestions for how to recover the user permissions without redoing all the steps?
Answer No: 21
The simplest solution is to stop the database, remove the contents of datadir/mysql directory and move there all the files from datadir/mysql_old (or copy preserving owner/group/permissions). Then start the server again.
Related MySQL FAQs to the Above FAQ
|
|