connection problem

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

connection problem

Postby Kristen » 03. May 2019 07:24

I 've installed Apache2, PHP7, MariaDB + phpMyAdmin (OS Mint 19.1).
When I try and run a small test prog, let's say localhost/test.php, whose only function is to open a database and let me know wether the connection is OK or not, I get an error message :
Code: Select all
connection failed

Same thing happens when I try and run phpMyAdmin in another browser tab, the prog answers with an error message under 'Wellcome to phpMyAdmin' :
Code: Select all
 #2002 - No such file or directory — Le serveur ne répond pas (ou l'interface de connexion vers le serveur MySQL local n'est pas correctement configurée

and three more messages at the bottom of the screen :
Code: Select all
mysqli_real_connect(): (HY000/2002): No such file or directory
La connexion au controluser tel que défini dans votre configuration a échoué.
mysqli_real_connect(): (HY000/2002): No such file or directory

But opening a terminal and typing :
Code: Select all
sudo /etc/init.d/mysql stop

then :
Code: Select all
sudo mysqld_safe --skip-grant-tables &

brings :
Code: Select all
190425 18:30:24 mysqld_safe Logging to syslog.
190425 18:30:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

.. hence, back to my browser, I reload both tabs, and, surprise, surprise, test.php tells me the connection is OK, et I can log in phpMyAdmin.
What's going wrong ?
Thanks for your help
Posts: 1
Joined: 03. May 2019 07:02
XAMPP version: 2
Operating System: Linux

Re: connection problem

Postby chrisjohnson » 01. November 2019 17:57

Sounds like a permission problem. When you run mysqld_safe with --skip-grant-tables, that gives everyone permission to everything.
Posts: 1
Joined: 01. November 2019 17:53
XAMPP version: 1.0
Operating System: RHEL

Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 3 guests