Friday, November 11, 2011
Exporting And Importing A MySQL Database
This week I ran into a problem when cloning my Ubuntu's MySQL database.I am using Phpmyadmin to manage my database and found it worked fine with exporting my data. The problem came to importing the data to the new server. Phpmyadmin has a file limitation of 2048 Kib and my file size is 1.8Gb. I searched the internet and found many convoluted ways of importing data to Phpmyadmin and none of them worked. The way I found out by trial and error is the fastest, easiest, and best of all works! Export data with phpmyadmin and import with MySQL directly. First log into phpmyadmin. Click on the export tab on the top. Once the export screen opens select all tables on the left. Leave all options and data to default. Chose where you want file to be created then press go. After you transfer your file to the new server. Use the Mysql command "mysql -u root -p -h 127.0.0.1 < /var/www/hpl_data.sql" ( /var/www/ is where I put my file yours might be different) the command prompt will then ask for your password. Type in your root password to your Mysql server press enter and your data base has been imported. Check phpmyadmin to confirm.
CTB
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment