How to Export the database in phpMyAdmin
I'm trying to move my mySQL database. I'm creating an install script (PHP) that will create the database on the new machine.
The problem is that when I go to phpMyAdmin and export the database, the views have database/user specific information in the create statement. Is there a simple way to remove them? (or a simpler way to create this script?) or will I have to go and hand retouch them all?
Thanks.
Re: How to Export the database in phpMyAdmin
Login to the phpMyAdmin there you could see the complete phpMyAdmin structure there Import and Export Database structure will be available then in the export section uncheck the box next to data and you'll only get the database structure.
Hope this helps to export the structure.
Re: How to Export the database in phpMyAdmin
Using your web browser,
- Go to the PHPMyAdmin location of the server where the database you wish to export resides. For example: for a remote database and a database hosted on your Apache2Triad installation. Select the name of the database you wish to export from the combo box on the left side of the page and you will be taken to that database's main operations page.
- Click the tab labeled "Export" and you will be taken to the Export database page.
- In the EXPORT group, select the check box:
* Select the check box marked "select all" to select all of the tables in the database for export.
* The radio button selected below should be "SQL".
- Within the OPTIONS group; under the STRUCTURE sub group,
* Select the check box next to "Structure"
* Select the check box labeled "add DROP TABLE"*
* Select the check box labeled "Add AUTO_INCREMENT value"
* Select the check box labeled "Enclose table and field names with backquotes"
- Within the OPTIONS group, under the DATA sub group:
* Select the check box marked "Complete inserts".
* Select the check box labeled "Use hexadecimal for binary fields" may be selected
* Select "INSERT" in the combo box labeled "Export type:"
- Below, select the check box labeled "Save as file" group,
- then type a name for the database and
- click the button labeled "Go".
- Select a location to save your database