Importing and Exporting Databases
Posted 04th октомври, 2018
PHPMyAdmin is a database administration tool you can use that allows you to make changes to your databases through a graphical user interface. Through PHPMyAdmin you can import and export databases, edit tables and run custom queries.
Importing a Database
To import a database from an .SQL file you would do the following
- Once in PHPMyAdmin, select the database on the left
- Click the
Import
tab - Choose the file on your machine
- Click
Import
.
If you receive an error saying cannot import to database xyz this is because your sql file is trying to create a new database, or has a database name set in the file. You should remove this line.
Exporting a Database
If you need an .SQL backup of your database, to export a database from PHPMyAdmin you would do the following
- Once in PHPMyAdmin, select the database on the left
- Click the
Export
tab - You can leave the settings as default with
SQL
selected in the drop down menu. - Click
Export
.