Topic on Project:Support desk

Cannot access the database: :real_connect(): (HY000/2002): No such file or directory.

5
PostgresN00B (talkcontribs)

Hi everyone,

I'm trying to move a legacy install of MediaWiki from a dead server to a new one.

I have exported my old postgres Database, reimported on the new server, and installed MediaWiki 1.32.0

I'm having trouble to connect to the database, during install I'm using :


Database Type : MariaDB, MySQL, or compatible

Database Host : Localhost

Database name : wikidb (an empty DB I created for testing)

Database table prefix : *left empty*

Database username: wikiuser

Database password : password


Wich throw back this error :

Cannot access the database: :real_connect(): (HY000/2002): No such file or directory.


I've create the testing DB + User as suggested in MediaWiki doc :

CREATE USER wikiuser WITH NOCREATEDB NOCREATEROLE NOSUPERUSER ENCRYPTED PASSWORD 'password'; CREATE DATABASE wikidb WITH OWNER wikiuser;


I'm having trouble troubleshooting this, any help would be appreciated, while I continue to poke around.


Many thanks !


Versions :

PostgreSQL 9.2.24

MediaWiki 1.32.0

CentOS7

php 7.3.5

php-pgsql-7.3.5-1.el7.remi.x86_64

174.56.68.128 (talkcontribs)

Maybe I'm thinking it's too simple, but is your web hosting software's database module (e.g. MySQL) turned on? For example, if you're using XAMPP (v3.2.4 is what I use as of this writing), in the Control Panel, there is the option to "Start" your MySQL. If it's not running, you won't be able to set up your DB.

Scripcat (talkcontribs)

Googling brought me here. I may not have the exact same configuration (I'm using a synology NAS) but I got this same error message while attempting to upgrade old mediawiki.


I was scratching my head until I changed "localhost" to "localhost:/run/mysqld/mysqld10.sock"

2600:6C4E:A80:D20:97A:8FCB:10DC:F1AD (talkcontribs)

Ok, but why the hell does what you did work

185.155.19.70 (talkcontribs)

Holly Molly!

"localhost:/run/mysqld/mysqld10.sock" - THAT WORKS

Thanks man!

Reply to "Cannot access the database: :real_connect(): (HY000/2002): No such file or directory."