Generating a .SQL script that will create a MySQL database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Generating a .SQL script that will create a MySQL database

Post by impulse() »

I have a database at the moment on a test server and I want phpMyAdmin to create a .SQL script that I can run on another server and will create all the tables & settings for the tables. Is this possible through phpMyAdmin or is it a CLI thing?

Regards,
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post by Mordred »

Select database -> Export
Check "Structure" and "Data", and optionally "SQL compatibility mode" if the other server is a different version.

mysqldump/mysql for command line variants if you insist doing so, although phpMyAdmin works perfectly.
Post Reply