Import Note points:
Importing with tools such as phpMyAdmin or navicat is still quite slow and can be imported directly using MySQL
The import command is as follows:
mysql>-uroot-psupidea jb51.net<E:\www.jb51.net.sql We can do it.
Description
mysql>-u mysql user name-p mysql password to import to the database name < SQL file path to import MySQL
This way the import will be very fast, and the SQL that was imported in the last few hours can now be completed in a few 10 seconds.
when exporting, note the point:
- e Use the multiple-line insert syntax that includes several values lists;
--max_allowed_packet= The maximum size of the buffer for the communication between the XXX client/server;
--net_buffer_length= XXX TCP/IP and socket communication buffer size, create a line of length up to net_buffer_length.
Note: Max_allowed_packet and net_buffer_length cannot be larger than the target database setting, otherwise there may be an error.
First determine the parameter values of the target library
mysql>Show variables like ' Max_allowed_packet ';
mysql>Show variables like ' net_buffer_length ';
Write mysqldump commands based on parameter values, such as:
mysql>mysqldump-uroot-psupidea jb51.net goodclassification-e--max_allowed_packet=1048576-- net_buffer_length=16384 >www.jb51.net.sql
MySQL Import data slow solution