I know this question has been asked countless times but I went through all of the solution proposed and none could solve my problem so far...
So I can access phpmyadmin, I've tried with & without a password, and it worked on localhost.
Now my code is online but my database is on localhost (using wamp). I've tried it before and it worked just fine.
When I try to execute the code (it's supposed to send a feedback to the db) I've got this error:
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
This is how I connect to my db:
try {
$bdd = new PDO('mysql:host=localhost;dbname=lexcelera', 'root', 'password');
}
catch(Exception $e) {
die('Erreur : ' .$e->getMessage());
}
and this is my config.inc:
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = '';
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'password';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Any solution to my problem? Also I'm using Windows 7 (lot of possible solutions were for Linux unfortunately).
Thanks!