[MediaWiki-l] Latest Debian version (Buster 10.2) new mediawiki install unable to connect to database

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Latest Debian version (Buster 10.2) new mediawiki install unable to connect to database

Keith Christian
Hello Friendly Mediawiki People,

Fresh format-disk-and-install Buster 64-bit.
This is my third attempt, with the mediawiki installer having problems
logging in to MariaDB every time.
I've installed mediawiki (Jessie?) with zero problems.

NOTE-----MariaDB was installed with a simple "sudo apt -y install
mediawiki" as described below.
Ran "sudo apt -y install mediawiki" without installing any other software.
Rebooted.

Opened browser to http://localhost/mediawiki/.
Got this screen:
        MediaWiki 1.31.4
        LocalSettings.php not found.
        Please set up the wiki first.

Clicked the "set up the wiki" link.
Got this status "The environment has been checked. You can install MediaWiki."

Clicked Continue.
Got this:
        Cannot access the database: No such file or directory (localhost).
        Check the host, username and password and try again.

Started MariaDB with this command line:
        sudo mysqld_safe --skip-grant-tables &

Able to log in as the MariaDB root user via mysql -u root.
Attempted to set the root password since mediawiki setup didn't like
the login info.
Unable to reset the root password:
        MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' =
PASSWORD('secret_password');
        ERROR 1131 (42000): You are using MariaDB as an anonymous user
and anonymous users are not allowed to modify user settings
        MariaDB [(none)]> select user();
        +--------+
        | user() |
        +--------+
        | root@  |
        +--------+
Exit mysql client.

Ran "sudo apt -y purge mediawiki" hoping to destroy the MariaDB
databases so I could get a fresh start solving mediawiki's db login
problems.
Rebooted.

Ran "sudo apt -y install mediawiki" again, no MariaDB installation
messages which meant the "purge mediawiki" did not also purge MariaDB
(which it installed.)
No success.

Seems that the mediawiki installer has defaults for the 'root'
database user with a blank password, doesn't work with that either.

What is wrong?

Thanks.

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [MediaWiki-l] Latest Debian version (Buster 10.2) new mediawiki install unable to connect to database

Jeffrey Walton
On Thu, Dec 19, 2019 at 2:07 PM Keith Christian
<[hidden email]> wrote:

>
> Hello Friendly Mediawiki People,
>
> Fresh format-disk-and-install Buster 64-bit.
> This is my third attempt, with the mediawiki installer having problems
> logging in to MariaDB every time.
> I've installed mediawiki (Jessie?) with zero problems.
>
> NOTE-----MariaDB was installed with a simple "sudo apt -y install
> mediawiki" as described below.
> Ran "sudo apt -y install mediawiki" without installing any other software.
> Rebooted.
>
> Opened browser to http://localhost/mediawiki/.
> Got this screen:
>         MediaWiki 1.31.4
>         LocalSettings.php not found.
>         Please set up the wiki first.
>
> Clicked the "set up the wiki" link.
> Got this status "The environment has been checked. You can install MediaWiki."
>
> Clicked Continue.
> Got this:
>         Cannot access the database: No such file or directory (localhost).
>         Check the host, username and password and try again.
>
> Started MariaDB with this command line:
>         sudo mysqld_safe --skip-grant-tables &
>
> Able to log in as the MariaDB root user via mysql -u root.
> Attempted to set the root password since mediawiki setup didn't like
> the login info.
> Unable to reset the root password:
>         MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' =
> PASSWORD('secret_password');
>         ERROR 1131 (42000): You are using MariaDB as an anonymous user
> and anonymous users are not allowed to modify user settings
>         MariaDB [(none)]> select user();
>         +--------+
>         | user() |
>         +--------+
>         | root@  |
>         +--------+
> Exit mysql client.
>
> Ran "sudo apt -y purge mediawiki" hoping to destroy the MariaDB
> databases so I could get a fresh start solving mediawiki's db login
> problems.
> Rebooted.
>
> Ran "sudo apt -y install mediawiki" again, no MariaDB installation
> messages which meant the "purge mediawiki" did not also purge MariaDB
> (which it installed.)
> No success.
>
> Seems that the mediawiki installer has defaults for the 'root'
> database user with a blank password, doesn't work with that either.
>
> What is wrong?

Maybe https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Create_a_database
?

Keep in mind I am probably one of the the worse guys to give advise
about maintaining MW software.

Jeff

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [MediaWiki-l] Latest Debian version (Buster 10.2) new mediawiki install unable to connect to database

Keith Christian
On Thu, Dec 19, 2019 at 12:36 PM Jeffrey Walton <[hidden email]> wrote:

> On Thu, Dec 19, 2019 at 2:07 PM Keith Christian
> <[hidden email]> wrote:
> >
> > Hello Friendly Mediawiki People,
> >
> > Fresh format-disk-and-install Buster 64-bit.
> > This is my third attempt, with the mediawiki installer having problems
> > logging in to MariaDB every time.
> > I've installed mediawiki (Jessie?) with zero problems.
> >
> > NOTE-----MariaDB was installed with a simple "sudo apt -y install
> > mediawiki" as described below.
> > Ran "sudo apt -y install mediawiki" without installing any other
> software.
> > Rebooted.
> >
> > Opened browser to http://localhost/mediawiki/.
> > Got this screen:
> >         MediaWiki 1.31.4
> >         LocalSettings.php not found.
> >         Please set up the wiki first.
> >
> > Clicked the "set up the wiki" link.
> > Got this status "The environment has been checked. You can install
> MediaWiki."
> >
> > Clicked Continue.
> > Got this:
> >         Cannot access the database: No such file or directory
> (localhost).
> >         Check the host, username and password and try again.
> >
> > Started MariaDB with this command line:
> >         sudo mysqld_safe --skip-grant-tables &
> >
> > Able to log in as the MariaDB root user via mysql -u root.
> > Attempted to set the root password since mediawiki setup didn't like
> > the login info.
> > Unable to reset the root password:
> >         MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' =
> > PASSWORD('secret_password');
> >         ERROR 1131 (42000): You are using MariaDB as an anonymous user
> > and anonymous users are not allowed to modify user settings
> >         MariaDB [(none)]> select user();
> >         +--------+
> >         | user() |
> >         +--------+
> >         | root@  |
> >         +--------+
> > Exit mysql client.
> >
> > Ran "sudo apt -y purge mediawiki" hoping to destroy the MariaDB
> > databases so I could get a fresh start solving mediawiki's db login
> > problems.
> > Rebooted.
> >
> > Ran "sudo apt -y install mediawiki" again, no MariaDB installation
> > messages which meant the "purge mediawiki" did not also purge MariaDB
> > (which it installed.)
> > No success.
> >
> > Seems that the mediawiki installer has defaults for the 'root'
> > database user with a blank password, doesn't work with that either.
> >
> > What is wrong?
>
> Maybe
> https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Create_a_database
> ?
>
> Keep in mind I am probably one of the the worse guys to give advise
> about maintaining MW software.
>
> Jeff
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



Jeff,

I’ll try the link, thanks for posting it.

Keith
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [MediaWiki-l] Latest Debian version (Buster 10.2) new mediawiki install unable to connect to database

Brian Wolff
In reply to this post by Keith Christian
I can't speak to anything debian specific, but the error you describe
suggests that php is looking for the mysql/mariadb socket file, and it
can't find it. Instead try putting the database host as 127.0.0.1

If your mariadb is set up not to use passwords, you'll probably have to
change that to allow MediaWiki to access it.

--
Brian

On Thu, Dec 19, 2019 at 7:07 PM Keith Christian <[hidden email]>
wrote:

> Hello Friendly Mediawiki People,
>
> Fresh format-disk-and-install Buster 64-bit.
> This is my third attempt, with the mediawiki installer having problems
> logging in to MariaDB every time.
> I've installed mediawiki (Jessie?) with zero problems.
>
> NOTE-----MariaDB was installed with a simple "sudo apt -y install
> mediawiki" as described below.
> Ran "sudo apt -y install mediawiki" without installing any other software.
> Rebooted.
>
> Opened browser to http://localhost/mediawiki/.
> Got this screen:
>         MediaWiki 1.31.4
>         LocalSettings.php not found.
>         Please set up the wiki first.
>
> Clicked the "set up the wiki" link.
> Got this status "The environment has been checked. You can install
> MediaWiki."
>
> Clicked Continue.
> Got this:
>         Cannot access the database: No such file or directory (localhost).
>         Check the host, username and password and try again.
>
> Started MariaDB with this command line:
>         sudo mysqld_safe --skip-grant-tables &
>
> Able to log in as the MariaDB root user via mysql -u root.
> Attempted to set the root password since mediawiki setup didn't like
> the login info.
> Unable to reset the root password:
>         MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' =
> PASSWORD('secret_password');
>         ERROR 1131 (42000): You are using MariaDB as an anonymous user
> and anonymous users are not allowed to modify user settings
>         MariaDB [(none)]> select user();
>         +--------+
>         | user() |
>         +--------+
>         | root@  |
>         +--------+
> Exit mysql client.
>
> Ran "sudo apt -y purge mediawiki" hoping to destroy the MariaDB
> databases so I could get a fresh start solving mediawiki's db login
> problems.
> Rebooted.
>
> Ran "sudo apt -y install mediawiki" again, no MariaDB installation
> messages which meant the "purge mediawiki" did not also purge MariaDB
> (which it installed.)
> No success.
>
> Seems that the mediawiki installer has defaults for the 'root'
> database user with a blank password, doesn't work with that either.
>
> What is wrong?
>
> Thanks.
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l