First, my database machine is a Win2k3 server with 3GB of RAM, running MySQL 5. An export of our production database generates a .sql file of approximately 2.3GB.
I am in the process of upgrading this server to 2.0. In so doing, I want to change some settings in my.ini so that the ibdata1 file doesn't grow so large. Currently it is almost 6GB on a Windows server 2003 machine.
I am of two minds about this and have two procedures outlined. I would appreciate any advice you may offer in this regard.
Option 1:
Step 0: Stop mysqld and backup the existing /data/ directory. Restart mysqld.
Step 1: Backup the existing databases (information_schema, moodle, moodle2 (our test site) and mysql to individual .sql files.
Step 2: Drop the moodle and moodle2 databases.
Step 3: Stop mysqld.
Step 4: Delete the entire /data/ directory except the /data/mysql/ folder.
Step 5. Restart mysqld and re-create moodle, moodle2, and information_schema (if necessary) by importing the .sql backups.
Step 6. Repeat as needed periodically when the ibdata file grows too large.
Option 2: (Based on http://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine)
Step 0: Stop mysqld and backup the /data/ directory. Restart mysqld.
Step 1: Backup the existing databases (information_schema, moodle, moodle2 (our test site) and mysql to individual .sql files.
Step 2: Drop the moodle and moodle2 databases.
Step 3: Stop mysqld.
Step 4: Delete the entire /data/ directory except the /data/mysql/ folder.
Step 5: Per stackoverflow, add the following to my.ini:
innodb_file_per_table
innodb_flush_method=O_DIRECT
innodb_log_file_size=25M
innodb_buffer_pool_size=225M
Step 6: Restart mysqld, recreate moodle, and moodle2 using the .sql backups.
Option 1 seems safer but still leaves me stuck with the possibility of an enourmous ibdata1 file. Option 2 may well solve my problem, but I am totally unfamiliar with these settings changes....
Again, any advice in this matter is greatly appreciated.
Thanks for your time,
jw