Home >Database >Mysql Tutorial >Detailed explanation of MySQL backup, restore, and opening innoDB
Assume that mysql is installed in D:/software/MySQL Server 5.1/
Then its bin There is a mysqldump.exe file in the directory
The account is root
The password is admin
The backup database name is test
The backup file is d:\test.sql
"D:/software/MySQL Server 5.1/bin/mysqldump.exe" -uroot -padmin -hlocalhost -P3306 test -r d:\test.sql
"D:/software/MySQL Server 5.1/bin/mysql.exe" -u root -padmin test < d:/test.sql
SHOW variables like 'have_%';
net stop mysql
Locate D :\tools\MYSQL\mysql-5.1.57-win32\data directory, find these 3 files
ib_logfile0
ib_logfile1
ibdata1
After backup, delete them
Note : D:\tools\MYSQL\mysql-5.1.57-win32 is my installation directory, please adjust it yourself
Open the file: D: \tools\MYSQL\mysql-5.1.57-win32\my.ini
添加一行 default-storage-engine=InnoDB 如果已经存在 default-storage-engine=MyISAM 像下面这样,注释掉即可#default-storage-engine=MyISAM
net start mysql
phpStudy is a program integration package for PHP debugging environment. This package integrates the latest Apache+PHP+MySQL+phpMyAdmin+ZendOptimizer. Among them, MySQL-Front is a particularly easy-to-use MySQL desktop management tool.
Assume that mysql is installed in D:/software/MySQL Server 5.1/
Then there are A mysqldump.exe file
The account is root
The password is admin
The backup database name is test
The backup file is d:\test.sql
"D:/software/MySQL Server 5.1/bin/mysqldump.exe" -uroot -padmin -hlocalhost -P3306 test -r d:\test.sql
"D:/software/MySQL Server 5.1/bin/mysql.exe" -u root -padmin test < d:/test.sql
SHOW variables like 'have_%';
net stop mysql
Locate D:\tools \MYSQL\mysql-5.1.57-win32\data directory, find these 3 files
ib_logfile0
ib_logfile1
ibdata1
After backup, delete them
Note: D: \tools\MYSQL\mysql-5.1.57-win32 is my installation directory, please adjust it yourself
Open the file: D:\tools\ MYSQL\mysql-5.1.57-win32\my.ini
添加一行 default-storage-engine=InnoDB 如果已经存在 default-storage-engine=MyISAM 像下面这样,注释掉即可#default-storage-engine=MyISAM
net start mysql
The above is the detailed content of Detailed explanation of MySQL backup, restore, and opening innoDB. For more information, please follow other related articles on the PHP Chinese website!