mysql access denied

Status
Not open for further replies.

chegos

New Member
Messages
2
Reaction score
0
Points
0
hi, i created one mysql database and add a user with all privileges. when try to connect there are an error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'chegos_root'@'int.lotus.x10hosting.com' (using password: YES) in /home/chegos/public_html/pruebadb.php on line 7
Error de conexion Access denied for user 'chegos_root'@'int.lotus.x10hosting.com' (using password: YES)

the source code:

1 ?php
2 $hostname = 'localhost';
3 $user = 'chegos_root';
4 $password = '*******';
5 $nom_base = 'chegos_prestashop';
6
7 $conn = mysql_connect($hostname, $user, $password) or die('Error de conexion '.mysql_error());
8
9 mysql_select_db($nom_base, $conn) or die('Error sql '.mysql_error());
10 ?>

thanks.
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
Hi,

Please check that the password you are using to connect is correct. Perhaps try changing the password for your MySQL user.
 

danprobo

Member
Messages
163
Reaction score
4
Points
18
Previously I got similar error, I resolve the error by deleting the user first (NOT THE DATABASE), after that creating user with same name and password, then grant privileges to the new user.
 
Last edited:

chegos

New Member
Messages
2
Reaction score
0
Points
0
The password is correct, however I tried changing the password for a new and still fails.
I have also tried recreating the user and grant all the permissions and also keeps failing.

greetings.
 
Status
Not open for further replies.
Top