In a previous post, I was trying to figure out the most optimal
way to switch from two large innodb table space files to using
innodb_file_per_table to take advantage of some of the benefits
of this setting. I had one part of it solved, which was to stop
MySQL, add innodb_file_per_table to the my.cnf, then restart,
perform a "no-op" alter of "ALTER TABLE t1 ENGINE=InnoDB" which
would cause the table to be re-created an it's own .ibd file. The
remaining problem was how to be able to resize the huge table
space files after converting all the tables to a smaller size (in
my case from 10GB to 10MB).
Someone suggested a better way:
1. Alter all innodb tables to MyISAM
2. Stop the server
3. Add innodb_file_per_table to my.cnf
4. Change innodb_data_file_path to new settings (10MB
tablespaces) in my.cnf
5. Move all innodb files (logs, data) to a backup directory
6. Restart MySQL
7. Alter …
Community journal
Follow the feed
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
Showing entries 11 to 11 of 11
« Previous |
Next »
Sep
15
2008
« Previous |
Next »