Export Database
---uroot-p123456-d dbname > dbname. ---uroot-p123456-t dbname > dbname. ---uroot-p123456 dbname > Dbname.sql
To export a specified table in a database
---uroot-p123456-d dbname Test > Test. ---uroot-p123456-t dbname Test > Test. ---uroot-p123456 dbname Test > Test.sql
Restores
--DEFAULT-- Restore Database mysql -uroot-p123456 dbname </path/dbname. -- Restore the database source dbname. -- view table structure desc wp_users;show CREATE table wp_users \g;
SELECT into outfile Export
SELECT * into OUTFILE ' temp.txt ', ' Optionally enclosed by ' "' LINES TERMINATED by ' \ n '< 1382716800;
LOAD DATA Import
LOAD DATA INFILE '/home/temp.txt', ' optionally enclosed by ' "' LINES TERMINATED by ' \ n '(product_id, Uui D,mac,monitor,win_version,ip,createtime);
Note: Importing a remote server from a local is required to useLOAD DATA LOCAL INFILE
Ensure that Local_infile is open and has permission to load data if the error: Message:the used command is not allowed with this MySQL version
1.MYSQL_CONNECT specifies a fifth parameter 128 test, i.e. mysql_connect ($host, $user, $pwd, False, Client_local_files)
MySQL Extended version in 2.PHP (pending confirmation)
Transferred from: http://itopic.org/mysqldump.html
Follow the public number: lovephp
MySQL export table structure and data