I have a MySQL database, about 8 GB, and I have tried several types to import it to MySQL databases, such as bigdump, PHPMyAdmin…, all fails. Finally, I found a way successfully. I am very glad to share this with all phper.
1. Run DOS command;
2. Go to the folder that contains mysql.exe. Mine is under F:xampp/mysql/bin, so I run the following DOS commands:
F:
cd xampp/mysql/bin
3. Use the following command to run MySQL, at the same time to import the big data to the MySQL database. Before you do this, please create a new database, just run:
mysqladmin -u username -p create newdatabase
after this, run:
mysql -u username -p newdatabase < olddbdump.sql
here my old sql data is under F:/xampp/htdocs/username.sql, so I run:
mysql -u username -p new_database_name < F:/xampp/htdocs/username.sql done! If you want to back up the extra big MySQL database, you can run the following: mysqldump -u username -p -v olddatabase > olddbdump.sql
or try:
mysqldump -u username -p olddatabase > olddbdump.sql