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.
In Debian, LocalSettings.php is apparently installed in
/etc/mediawiki/LocalSettings.php, or there's a symlink between both.
I am getting the same error message. Were you ale to resolve this issue. The mediawiki upgrade is taking more time than actually creating new wiki and getting new domain name :(
Thank you for your response. My mediawiki is installed on Dreamhost with PHP5.2. I was trying to upgrade the mediawiki to newer version and so I upgraded my PHP to 5.4 and when I ran the update.php command it gave me error. My Localsettings.php is installed in wiki2\includes folder and I did verified my password and its is correct.
That doesn't seem correct. Your LocalSettings.php is usually placed in the MediaWiki installation folder, not inside "includes". Please check that a LocalSettings.php exists on your installation directory (and not in any subdirectory) and that database settings are correct.
Have you maybe moved the file into the includes/ directory? In this case moving it back might fix your problem...
My apologies but LocalSettings.php is in the MediaWiki installation folder, not inside "includes". I got confused with the DefaultSettting. Also the Dbuser, Dbpassword and server are all correct. I tried them on my SQL and they work fine.
Can you check, if the username written in the error message, is the same, like the one you wrote in your LocalSettings.php? (And it's really exact the same error message like the one in the thread title?)
Last edit: 13:57, 9 October 2014
This is the error I get==> (Can't contact the database server: Access denied for user ''@'ps8293.dreamhost.com' (using password: NO) (mysql.keywords.fordhamitac.org)
I looked into username in Localsettings and that is the correct one. I am not sure where the update.php is picking ''@'ps8293.dreamhost.com' from since the LocalSettings.php has the correct credentials.
Hi there. I am getting this error:
DB connection error: Access denied for user 'livinhp8_wiki'@'box285.bluehost.com' (using password: YES) (220.127.116.11).
Check the host, username and password and try again.
Not sure what I am doing wrong. Username, password and permissions are fine.
Your error message shows that MediaWiki uses the MySQL username "livinhp8_wiki" as $wgDBuser. When you are at it, please verify that "box285.bluehost.com" is the correct value for $wgDBserver! Also the name of the DB must be correct.
GRANT ALL PRIVILEGES ON database_name TO user@host IDENTIFIED BY 'password'; FLUSH PRIVILEGES;
in MYSQL should give the according rights and clear the priv cache.