[MediaWiki-l] Help! Cannot connect to database!
agnese.camellini at gmail.com
Tue Dec 29 20:56:52 UTC 2015
Well i don't know if this is your case but i had a similar problem
installing mediawiki 1.25.3 AND my problem was with the server permissions.
The server didn't had the permission to access the db on the same machine.
Considering it has taken to me a long time to understand the problem i
advice you to run journalctl (or a similar command in your OS i don't know,
i use fedora. I had to fix a coupple of things but it was all written in
that file so i just add to copy and paste.. (well the command was actually:
# grep httpd /var/log/audit/audit.log | audit2allow
# semodule -i mypol.pp
so it was a problem with selinux).
Considering it took me 3 weeks to work this out i would be more than happy
to save you some time but maybe that's not the same problem..
my 2 cents
On 29 December 2015 at 21:47, Marcin Cieslak <saper at saper.info> wrote:
> On 2015-12-19, Jan Steinman <Jan at EcoReality.org> wrote:
> > This is on MediaWiki 1.16 (yea, I know), MariaDB 10.1.8, and MacOS X
> > I had a database problem, and reinitialized and restored my database
> > from a recent logical (SQL source) backup. There were no changes to
> > any MediaWiki PHP files. The character set (UTF8) did not change.
> > Now, I get the infamous "[Sitename] has a problem… Can't contact the
> > database server: Permission denied (localhost)."
> > The host/database/user/password info in LocalSettings.php has not
> > changed. I can use those same credentials to access the database
> > from various tools, such as mysql CLI client, phpMyAdmin, and Sequel
> > Pro. And yet, MediaWiki is still unwilling to connect. I even tried
> > tagging "?action=purge" onto the URL to rule out caching problems.
> How exactly did you restore the backup? How did you re-create the users?
> Did you "mysqladmin reload" after re-loading the "mysql" database?
> Can you see the actual data after connecting with:
> mysql -uuser -ppasswd mediawikidatabase
> select * from revision limit 10;
> > I'm leaning toward a MySQL User permissions problem, but I think I've
> > ruled that out by getting in using the same credentials with other
> > tools.
> > Any insight? Please show me something simple and stupid that I've been
> > overlooking!
> Also you might need to login as the database supervisor (sometimes
> called "root") and talk to the "mysql" database and examine entries in
> the "user" and "db" tables (and maybe "host").
> Maybe that didn't get restored as it was before.
> The best way to re-create the user needed is this:
> GRANT INDEX, CREATE, SELECT, INSERT, UPDATE, DELETE, DROP, ALTER, LOCK
> TABLES ON mediawikidatbase.* to 'wikiuser'@'localhost'
> IDENTIFIED BY 'password';
> Please keep in mind that 'wikiuser'@'%' and 'wikiuser'@'localhost' are
> different users from the MySQL point of view, with their own passwords
> and permissions.
> MediaWiki-l mailing list
> To unsubscribe, go to:
More information about the MediaWiki-l