Difference between revisions of "How to apply a .sql file to a database"

From Joomla! Documentation

m (some smart person might think, the link yields to "their" PMA ... %-/)
Line 1: Line 1:
Login to your MySQL database via phpMyAdmin [http://www.phpmyadmin.net]. Click the link to the Export section. Choose the SQL tab. Enter the code lines into the text box and press Go. You will be provided with the results of the command on this screen.
+
= Using phpMyAdmin =
 +
Login to your MySQL database via phpMyAdmin [http://www.phpmyadmin.net]. Click the link to the Export section. Choose the SQL tab. Select your database, enter the code lines into the text box and press Go. You will be provided with the results of the command on this screen.
 +
 
 +
= Using MySQL Query Browser =
 +
Login to your MySQL database via MySQL Query Browser [http://www.mysql.com/products/tools/query-browser/]. Double click on your database on the right hand side to select it. Create a new "script" tab and enter the code lines into the text box provided and press "Execute".
 +
 
 +
= Using the command line MySQL client (advanced!) =
 +
MySQL by default ships with a command line client [http://dev.mysql.com/doc/refman/5.0/en/mysql.html] that enables access to MySQL databases. Change to the directory containing a copy of the script file (e.g. /installation/sql/mysql). Connect to your mysql database with the tool (e.g. ''mysql --username=joomla --password=password joomla_database_name'') and then run the script using "\. scriptname.sql", for example: "\. diff_rc3_to_rc4.sql".

Revision as of 21:35, 25 January 2008

Using phpMyAdmin[edit]

Login to your MySQL database via phpMyAdmin [1]. Click the link to the Export section. Choose the SQL tab. Select your database, enter the code lines into the text box and press Go. You will be provided with the results of the command on this screen.

Using MySQL Query Browser[edit]

Login to your MySQL database via MySQL Query Browser [2]. Double click on your database on the right hand side to select it. Create a new "script" tab and enter the code lines into the text box provided and press "Execute".

Using the command line MySQL client (advanced!)[edit]

MySQL by default ships with a command line client [3] that enables access to MySQL databases. Change to the directory containing a copy of the script file (e.g. /installation/sql/mysql). Connect to your mysql database with the tool (e.g. mysql --username=joomla --password=password joomla_database_name) and then run the script using "\. scriptname.sql", for example: "\. diff_rc3_to_rc4.sql".