Difference between revisions of "Rename a MediaWiki database"
From Organic Design wiki
(dont forget the other change in *.dmp) |
(not cat installation) |
||
Line 6: | Line 6: | ||
The simplest approach is to take a sql dump of a database; | The simplest approach is to take a sql dump of a database; | ||
− | |||
{{code|<PHP> | {{code|<PHP> | ||
mysqldump -u [user] --password='**********' --single-transaction -B [database] > backupfile.sql # Backup | mysqldump -u [user] --password='**********' --single-transaction -B [database] > backupfile.sql # Backup | ||
</PHP> | </PHP> | ||
}} | }} | ||
+ | |||
and manually edit the lines in '''backupfile.sql''' | and manually edit the lines in '''backupfile.sql''' | ||
Line 19: | Line 19: | ||
</PHP> | </PHP> | ||
}} | }} | ||
+ | |||
then restore the mysqldump file with; | then restore the mysqldump file with; | ||
− | |||
{{code|<PHP> | {{code|<PHP> | ||
mysql -u [user] -p [database] < backupfile.sql # Restore | mysql -u [user] -p [database] < backupfile.sql # Restore | ||
Line 34: | Line 34: | ||
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. | 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. | ||
− | |||
− |
Revision as of 03:37, 2 May 2009
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.