Manual talk:Restoring a wiki from backup
Add topicAppearance
Latest comment: 10 years ago by Laudaka in topic Section: Re-create the database, user and permissions
Section: Import the database backup
[edit]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
TiloWiki (talk) 01:17, 19 February 2013 (UTC)
- 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
[edit]- 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.
Laudaka (talk) 16:30, 17 August 2014 (UTC)
- 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
Laudaka (talk) 10:01, 9 September 2014 (UTC)
- 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;
All sections
[edit]- 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
wikifolder
instead ofwiki_folder
becausewikidb
has 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
Laudaka (talk) 18:12, 17 August 2014 (UTC)
- Not yet finished. Laudaka (talk) 19:04, 17 August 2014 (UTC)
List of placeholders proposed by Laudaka
[edit]- Directories AKA folder with files (in the filesystem):
wikifolder wikifolder_backup
- And this is in the MySQL/PostgresQL/SQLite database:
wikidb wikidb_user wikidb_userpassword