Difference between revisions of "Rename a MediaWiki database"
From Organic Design wiki
(dont forget the other change in *.dmp) |
|||
Line 12: | Line 12: | ||
}} | }} | ||
− | and manually edit the | + | and manually edit the lines in '''backupfile.sql''' |
+ | {{code|<PHP> | ||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ [database] | CREATE DATABASE /*!32312 IF NOT EXISTS*/ [database] | ||
+ | |||
+ | USE DATABASE [database] | ||
+ | </PHP> | ||
+ | }} | ||
then restore the mysqldump file with; | then restore the mysqldump file with; |
Revision as of 20:01, 20 November 2008
Rename a MediaWiki database Organic Design procedure |
The simplest approach is to take a sql dump of a database;
and manually edit the lines in backupfile.sql
then restore the mysqldump file with;
In the LocalSettings.php file, the global
may need to be changed to point to the new database. Privileges may also need to be set in the db table in the mysql permissions database.