Forum

Error, can't connec...
 
Notifications
Retirer tout

Error, can't connect to local MySQL server

12 Posts
3 Utilisateurs
0 Reactions
6,475 Vu
(@kdridi)
Posts: 5
Active Member
Début du sujet
 
[#5862]

Hello,

I encountered an error while installing ProjeQtor.
the following message tells me a port problem.
I have a LAMB installation under CentOs 7. with MariaDB

SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (13)
Dsn = mysql:host=localhost:port=

Thanks for your help

Kamel


 
Posté : 22/03/2019 5:06 pm
(@babynus)
Posts: 14952
Membre Admin
 

The port is not specified.
For mysql, default port is 3306


 
Posté : 22/03/2019 5:40 pm
(@kdridi)
Posts: 5
Active Member
Début du sujet
 

Thank you for your answer.
yes in "database port" I enter "3306" for the configuration of projeqtor at the time of installation


 
Posté : 22/03/2019 5:44 pm
(@babynus)
Posts: 14952
Membre Admin
 

Check parameters.php file (default location is files/config)
Is paramDbPort correctly stored ?


 
Posté : 22/03/2019 5:48 pm
(@kdridi)
Posts: 5
Active Member
Début du sujet
 

sorry I'm wrong message here is the good error message (again thank you for your answers ...)

SQLSTATE[HY000] [2003] Can’t connect to MySQL server on '127.0.0.1' (13)
Dsn = mysql:host = 127.0.0.1:port = 3306

thanks


 
Posté : 22/03/2019 6:02 pm
(@mcanuto)
Posts: 183
Reputable Member
 

In complement, the file parameters.php is absent for the moment.


 
Posté : 22/03/2019 7:18 pm
(@babynus)
Posts: 14952
Membre Admin
 

Check your install of MariaDB
Sometimes, MariaDB is configured to listen on port 3307


 
Posté : 22/03/2019 7:43 pm
(@kdridi)
Posts: 5
Active Member
Début du sujet
 

Thank you for your reply.

This command works : # mysql -u root -p
After they ask me the password and it works I connect to mysql
But this command does not work : # mysql -u root -p 3306 (or 3307)
After they ask me the password and it does not work !

Thanks


 
Posté : 22/03/2019 7:56 pm
(@babynus)
Posts: 14952
Membre Admin
 

You have to check your config file (my.ini or my.cnf) to check which port is used.


 
Posté : 22/03/2019 8:19 pm
(@babynus)
Posts: 14952
Membre Admin
 

Also check that the user you user (root ?) can connect from "localhost"


 
Posté : 22/03/2019 8:19 pm
(@kdridi)
Posts: 5
Active Member
Début du sujet
 

Thank you for your reply.

I send you as an attachment the contents of my.cnf file

Thanks


 
Posté : 25/03/2019 12:16 pm
(@babynus)
Posts: 14952
Membre Admin
 

Check access rights of user you use to log in to db through projector.
It must be granted to connect from localhost.


 
Posté : 27/03/2019 10:22 am
Share:
Retour en haut