Jump to content

Error in database connection [SOLVED]


Steve Joms

Recommended Posts

Hi All,

 

Does anyone here encountered this problem? 

 

Link to database cannot be established: SQLSTATE[HY000] [2003] Can't connect to MySQL server

 

Im using AWS server for my website and as per running a test connections I have a successful result using ssh in EC2 instance connecting to my Database and also using Mysql workbench. Only I am receiving that error when Im accessing my URL I used same credentials on running that test with my settings.inc.php

 

Should I edit this portion also?

 

define('_COOKIE_KEY_

define('_COOKIE_IV_

 

Hope you could help me with this.

 

Thanks! :D

Edited by joms (see edit history)
Link to comment
Share on other sites

The error is related connection between server and database server. If it is not on the same server, make sure you have correct database connection info in file /config/settings.inc.php, especially the 

 

define('_DB_SERVER_', '127.0.0.1');
define('_DB_NAME_', 'yourdbname');
define('_DB_USER_', 'yourdbuser');
define('_DB_PASSWD_', 'yourpassword');
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...