Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Error, can't connec...
 
Notifications
Clear all

Error, can't connect to local MySQL server

12 Posts
3 Users
0 Reactions
6,478 Views
(@kdridi)
Posts: 5
Active Member
Topic starter
 
[#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


 
Posted : 22 Mar 2019 17H06
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

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


 
Posted : 22 Mar 2019 17H40
(@kdridi)
Posts: 5
Active Member
Topic starter
 

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


 
Posted : 22 Mar 2019 17H44
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

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


 
Posted : 22 Mar 2019 17H48
(@kdridi)
Posts: 5
Active Member
Topic starter
 

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


 
Posted : 22 Mar 2019 18H02
(@mcanuto)
Posts: 183
Active Member
 

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


 
Posted : 22 Mar 2019 19H18
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

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


 
Posted : 22 Mar 2019 19H43
(@kdridi)
Posts: 5
Active Member
Topic starter
 

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


 
Posted : 22 Mar 2019 19H56
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

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


 
Posted : 22 Mar 2019 20H19
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

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


 
Posted : 22 Mar 2019 20H19
(@kdridi)
Posts: 5
Active Member
Topic starter
 

Thank you for your reply.

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

Thanks


 
Posted : 25 Mar 2019 12H16
babynus
(@babynus)
Posts: 14957
Main Contributor Admin
 

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


 
Posted : 27 Mar 2019 10H22
Share:

Scroll to Top