I installed PrestaShop (Version 1.6.0.11) using "Softaculous" from my hosting company, everything went fine while installing but got error when accessing my site. I am getting error as below when I access my site http://mck.x10.mx/prestashop/
Link to database cannot be established: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
My config/settings.inc.php has following settings (actual values changed)
define('_DB_SERVER_', 'localhost');
define('_DB_NAME_', 'mydbname');
define('_DB_USER_', 'mydbuser');
define('_DB_PASSWD_', 'mydbpassword');
define('_DB_PREFIX_', 'ps_');
define('_MYSQL_ENGINE_', 'InnoDB');
NOTE: I also have wordpress site and it is working with similar credentials, so I know the database is working.
The wordpress site settings are
/** The name of the database for WordPress */
define('DB_NAME', 'mydbname');
/** MySQL database username */
define('DB_USER', 'mydbuser');
/** MySQL database password */
define('DB_PASSWORD', 'mydbpassword');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';