I. Install MySQL
In the MySQL database directory find the run mysql-essential-5.0.67-win32.msi Installation File, click Next select Custom installation method, as shown in:
2: click "Next" until the following installation page is displayed:
3: click the "Finish" button, follow the installation steps, and click the "Next" button until the following window appears. In this window, select to install the Server as the Server Machine, instead of the default Developer Machine, as shown in:
(4) After clicking the Next button, keep following the installation steps and click the Next button until the following window appears. Use the Online Transaction OLAP option as the installation method, as shown in:
(5) After clicking the Next button, keep following the installation steps and click the Next button until the following window appears, "manually select character set options" as the installation method, change the default latin1 to GB2312. Otherwise, MySQL data does not support Chinese characters, as shown in
Modify the config file. As shown in:
(7) after clicking the Next button, keep following the installation steps and click the Next button. The last button to be clicked is the Execute button until the installation is complete.
Ii. import data files
(1) enter the "command prompt" interface and enter the command "mysql-u username-p password" to log on to the database. For example, the user name is root and the password is mtdb, enter "mysql-u root-pmtdb" and press enter to log on. As shown in:
(2) Enter "create database name character set utf8;" to create a database, for example, to create a mtcems database, and enter "create database mtcems character set utf8;", as shown in:
(3) view all databases and enter "show databases;" to view the database you just created, as shown in:
(4) Select the database you just created, for example, select the "mtcems" database and enter "use mtcems;", as shown in:
(5) import the SQL file and enter "source SQL file path". For example, the SQL file directory is "f: \ mtcems. SQL, enter "source f: \ mtcems. SQL, as shown in:
(6) After the import is successful, enter "show tables" to view all created tables, as shown in:
Iii. Export files
(1) enter the "command prompt" interface and enter the command "mysqldump-u username-p Password Database Name> export SQL data file name" to export the data file. For example: export the "mtcems" database to the drive c directory, and enter "mysqldump-u root-pmtdb mtcems> c: \ mtcems. SQL ". As shown in: