Can't contact the database server: Access denied for user 'wikiuser'@'localhost' (using password: NO) (localhost))
I have installed the mediawiki in Redhat linux environment and all the installation with configuration are went fine, but in the end when I tried to access the mediawike i getting below error message:
Can't contact the database server: Access denied for user 'wikiuser'@'localhost' (using password: NO) (localhost)) I am not sure what was the problem i was able to login as wikiuser at wikidb (database).
Can someone help me what will be the issue and where I am wrong.
thanks in advance.
The error message states that you're trying to connect to the database in localhost using the 'wikiuser' user account but without specifying a password.
Be sure you specify a valid password for connecting to the database (configured in LocalSettings.php).
thanks for your reply.
yes i have give wikiuser password only. i tried to login in mysql with wikiuser and its password and it is working fine.
but not sure i am getting access denied error for wikiuser.
Please, be sure that you've configured $wgDBpassword. It's not clear from your reply that you've done that.
- Database settings
$wgDBtype = "mysql"; $wgDBserver = "localhost"; $wgDBname = "wikidb"; $wgDBuser = "wikiuser"; $wgDBpassword = "wikiuser";
just want to recheck with you, i have copied LocalSettings.php file under /var/www/devwiki/ path, is it ok?
because all the mediawiki folder and files are under devwiki.
Those settings seem okay.
Maybe the problem is the user. Note that on mysql the user is also associated to a host (localhost in this case). Try resetting the password: http://dev.mysql.com/doc/refman/5.0/en/assigning-passwords.html
You should do that for 'wikiuser'@'localhost', 'wikiuser'@'%' and 'wikiuser'@'yourhost', where "yourhost" is the hostname of the database.
I also get:
(Can't contact the database server: Access denied for user 'wikiuser'@'localhost' (using password: NO) (localhost))
The reason is that the LocalSettings.php is not honored.
I am on a debian wheezy and my version of mediawiki is: 1:1.19.18+dfsg-0+deb7u1
If I enter the database access information into the /usr/share/mediawiki/includes/DefaultSettings.php file things are working at least for the database connection. Then the next things starts failing.
Please make sure you are editing the correct LocalSettings.php file! Maybe you also have some symlinks in place, which break the setup: Usually MediaWiki has to be installed somewhere in the webroot folder, which usually is /var/.../www/. You however, seem to use it from /usr/share/, which means that you somehow have to make these files accessable to the outside world. I think the way you do this is part of the problem.