Forums

Noobie guide to importing your local database for the first time

Took me a couple of hours to figure this out - here's the steps I followed

Assuming that you have phpMyAdmin as I had. To backup your MySQL database using PHPMyAdmin just follow a couple of steps:

Open phpMyAdmin. Select your database by clicking the database name in the list on the left of the screen. Click the Export link. This should bring up a new screen that says View dump of database (or something similar). In the Export area, click the Select All link to choose all of the tables in your database. In the SQL options area, click the right options. Click on the Save as file option and the corresponding compression option and then click the 'Go' button. A dialog box should appear prompting you to save the file locally Use the .sql extension

Upload the database backup to your files using the Files tab on the dashboard

Open a database console in the Databases tab on the console and type:

use yourusername$yourdatabasename;

source yourbackupname.sql;

Then to view your newly imported tables show tables;

Then execute sql as normal

select * from yourtablename;

Thanks for sharing that! Do you mind if we put in on the "Help" pages (with attribution, of course)?

go for it giles! feel free to edit and correct any misapprehensions.

Thanks!

Here it is.

Does this mean you'll want one for PGAdmin III as well?