Importing SQL
Importing SQL
A .sql script file containing a CREATE TABLE command MySQL Query Browser or phpMyAdmin Other MySQL database tools will require similar steps. An empty MySQL database already created
Note: Most .sql script files provided through WebAssist.com require MySQL server 4.2 or higher for it to be successfully imported. Any previous version may return an error. If you receive an error when importing to your live server, you may want to contact your hosting provider to confirm the version that is being used.
Using phpMyAdmin phpMyAdmin is commonly used for managing MySQL databases. Many hosting providers, such as GoDaddy, provide this tool for making database modifications. Although, various hosting providers use different versions of phpMyAdmin, the steps shown here should be consistent throughout. Copying the SQL script
2. Open the .sql file in a regular text editor such as Notepad or TextEdit. 3. Select all the content by pressing Ctrl (Cmd) + A. 4. Copy the content by pressing Ctrl (Cmd) + C. 5. Close your text editor application.
Executing the script
6. In phpMyAdmin, choose the database you intend to work with from the
Database menu list.
2. Paste the SQL script you copied by pressing Ctrl (Cmd) + V 3. Choose Go.
4. Confirm that your new table has been imported by clicking the
Structure tab.
Page 2 of 3
Using MySQL Query Browser MySQL Query Browser is part of the MySQL GUI Tools available at http://mysql.com/. These same steps can be used for most other MySQL administrator tools.
1. Using the MySQL Query Browser, connect to your MySQL Server. 2. From the Schemata panel, select the database you intend to add the
new database table to.
3. Choose File > Open Script. 4. Navigate to the .sql file you wish to import. 5. Click Open. 6. Select Execute.
7. Confirm that the new database table appears in the Schemata panel.
Page 3 of 3