Manual talk:Restoring a wiki from backup
Jump to navigation Jump to search
Section: Import the database backup
please check the import of DB (restore of DB)
- mysqldump --default-character-set=binary --user=foobar --password=barbaz wikidb > dbdump.txt
- mysql --silent --local --password=barbaz newdb < dbdump.txt
should be with user? so:
- mysql --user=foobar --silent --local --password=barbaz newdb < dbdump.txt
- Your absolutely correct TiloWiki. Had already been FIXED by someone. Laudaka (talk) 10:01, 9 September 2014 (UTC)
Section: Re-create the database, user and permissions
- I tidied up the commands someone has to give on the SQL prompt. The formatting is now very close to the MySQL documentation like here http://dev.mysql.com/doc/refman/5.5/en/create-user.html
- IDENTIFIED BY was missing, so you would end up with a MySQL user with no password.
- When trying to restore the wikidb with the mysql command I get this error:
ERROR 1142 (42000) at line 22: DROP command denied to user 'wikidb_user'@'localhost' for table 'mw_archive'
- So to the list of permissions of our MySQL wikidb_user we need to add the DROP permission:
USE wikidb; GRANT SELECT ON wikidb.* TO wikidb_user; GRANT UPDATE ON wikidb.* TO wikidb_user; GRANT INSERT ON wikidb.* TO wikidb_user; GRANT DELETE ON wikidb.* TO wikidb_user; GRANT DROP ON wikidb.* TO wikidb_user; <===== ADDED
- Hmmmmm. I'm not so sure about the need for the DROP permission. Can someone with MySQL expertise have a look at it? The first time I got an ERROR 1142 the GRANT DROP command above solved it. For another wiki I restored I had to use the command line below. I don't know what to think of it. Please FIXME. Thanks in advance.
GRANT DROP ON wikiclubnix.* TO mediawiksoft@localhost;
- For the things the user has to fill in I consistently changed everything in
wikidb wikidb_user wikidb_userpassword. Both in what has to be typed on the MySQL prompt (mysql) and what has to be typed on the ordinary command line (bash or cmd.exe)
- I chose for
wikidbhas been written as one word as well.
- I would appreciate if someone could have a look if everything is OK. I'm an advanced user but by no means a professional :-) BTW Thanks for this versatile piece of open source software MediaWiki :-D
List of placeholders proposed by Laudaka
- Directories AKA folder with files (in the filesystem):
- And this is in the MySQL/PostgresQL/SQLite database:
wikidb wikidb_user wikidb_userpassword