Actions

How to apply a .sql file to a database

From Joomla! Documentation

Revision as of 23:13, 25 January 2008 by Frankd4 (Talk | contribs)

Using phpMyAdmin

Login to your MySQL database via phpMyAdmin [1]. Select your database. 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 MySQL Query Browser

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!)

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".