|
I am trying to connect to MySQL database using php script. Always i get this error: Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'testdb'@'localhost' (using password: YES)
my php script: $mysqli = mysqli_connect(localhost, MySQLUsername, MySQLPassword);
Finally i change my php script so that i connect to MYSQL using my Cpanel account name and password.
I can login but with warning that say no database selected.
Problem:
Seems like mySQL database username has to be the same as my cpanel account name in order for me to login in to the database.
Problem is my cpanel account name is 8 character and mySQL database username is 7 character max. Also I am not allow to change my Cpanel account name since its ties to my domain name.
I cant create a mySQL database username the same as my Cpanel account name.
Can anyone help??
Cpanel account name and MySQL username creating problem.?
contact your hosting service support.
|