- Dump all databases by calling:
mysqldump --extended-insert --all-databases --add-drop-database --disable-keys --flush-privileges --quick --routines --triggers > all-databases.sql
- Stop the MySQL server;
- 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;
- Make the appropriate changes in my.cnf;
innodb_file_per_table - 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
- Start the MySQL server;
- Get into the ‘mysql‘ console and type:
SET FOREIGN_KEY_CHECKS=0;
SOURCE all-databases.sql;
SET FOREIGN_KEY_CHECKS=1; - Restart the MySQL server.
2015/01/11
Split IBDATA1
1 Comment »
RSS feed for comments on this post. TrackBack URL
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 ;}?>
Comment by Mymelody — 2015/12/26 @ 17:33