Split IBDATA1

  1. Dump all databases by calling:
    mysqldump --extended-insert --all-databases --add-drop-database --disable-keys --flush-privileges --quick --routines --triggers > all-databases.sql
  2. Stop the MySQL server;
  3. Rename or remove (in case you’ve already backed it up) the MySQL data directory and create an empty one with the same name and permissions;
  4. Make the appropriate changes in my.cnf;
    innodb_file_per_table
  5. Re-initialize the database with the following command (replace the ‘mysqld‘ with the login of the user your MySQL server runs as):
    sudo -u mysqld mysql_install_db
  6. Start the MySQL server;
  7. Get into the ‘mysql‘ console and type:
    SET FOREIGN_KEY_CHECKS=0;
    SOURCE all-databases.sql;
    SET FOREIGN_KEY_CHECKS=1;
  8. Restart the MySQL server.

Comments

One response to “Split IBDATA1”

  1. CODE: (took out first 1st line of entire dnmuceot// Connect to the file above hererequire? connect_to_mysql.php ; $sqlCommand = CREATE TABLE admin ( id int(11) NOT NULL auto_increment, username varchar(24) NOT NULL, password varchar(24) NOT NULL, last_log_date date NOT NULL, PRIMARY KEY (id), UNIQUE KEY username (username) ) ;if (mysql_query($sqlCommand)){ echo Your admin table has been created ;}else { echo Error, admin table NOT created ;}?>

Leave a Reply

Your email address will not be published. Required fields are marked *