Difference between revisions of "Rename a MediaWiki database"

From Organic Design wiki
m
Line 14: Line 14:
 
and manually edit the line;
 
and manually edit the line;
  
  CREATE DATABASE *name* IF NOT EXISTS
+
  CREATE DATABASE /*!32312 IF NOT EXISTS*/ [database]
  
 
then restore the mysqldump file with;
 
then restore the mysqldump file with;

Revision as of 09:26, 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;

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

then restore the mysqldump file with;


<PHP>

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