Skip to content

Troubleshooting

Andrew edited this page Dec 27, 2015 · 5 revisions

##MySQL Backup Failed Your MySQL backups are failing with the following error message.

Access denied for user 'wikiuser'@'localhost'

The issue is that the Wiki user doesn't have complete access to it's own database. You will need to modify the database permission in order to resolve the issue.

root@wiki:~# mysql -u root -p
Enter password:

Now that you are logged into MySQL:

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| wikidb             |
+--------------------+
4 rows in set (0.03 sec)

Modify privileges:

mysql> GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost';

Your privileges should look like the below example:

mysql> SHOW GRANTS FOR 'wikiuser'@'localhost';
+-----------------------------------------------------------------------------------------------------------------+
| Grants for wikiuser@localhost                                                                                   |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'wikiuser'@'localhost' IDENTIFIED BY PASSWORD '*1A2B3C4D5E6F7G8H9I123456789ABCD' |
| GRANT ALL PRIVILEGES ON `wikidatabase`.* TO 'wikiuser'@'localhost'                                                    |
+-----------------------------------------------------------------------------------------------------------------+
2 rows in set (0.01 sec)

Kick off the backup again and it should be resolved.

##XML Dump Failed Your XML dump are failing with the following error message.

DB connection error:  Access denied for user 'root'@'localhost' (using password: NO)
Backup Failed

The problem is you are using an old version of MediaWiki prior version 1.16 which require a file called AdminSettings.php with the Database credentials which been depreciated.

  1. You can upgrade the MediaWiki version to at least 1.16 or above.
  2. Create a file called AdminSettings.php with the content below in the root directory of the MediaWiki installation.
<?php
/* Database authentication credentials */
$wgDBadminuser      = 'wikiadmin';
$wgDBadminpassword  = 'adminpass';

/* Whether to enable the profileinfo.php script. */
$wgEnableProfileInfo = false;
?>

See MediaWIki page on this for more details.

Clone this wiki locally