Difference between revisions of "Rename a MediaWiki database"

From Organic Design wiki
m
m
Line 12: Line 12:
 
}}
 
}}
  
and manually edit the line;
+
and manually edit the line in '''backupfile.sql'''
 
 
 
  CREATE DATABASE /*!32312 IF NOT EXISTS*/ [database]
 
  CREATE DATABASE /*!32312 IF NOT EXISTS*/ [database]
  

Revision as of 09:27, 18 November 2008

Procedure.svg Rename a MediaWiki database
Organic Design procedure

The simplest approach is to take a sql dump of a database;


{{{1}}}

and manually edit the line in backupfile.sql

CREATE DATABASE /*!32312 IF NOT EXISTS*/ [database]

then restore the mysqldump file with;


<PHP>

mysql -u [user] -p [database] < backupfile.sql # Restore </PHP>