Fail to connect online but in localhost i connect

Avatar
  • updated
  • Answered

Please developer this is my code i use to connect into my database online it fail to connect with error

Could not connect: Access denied for user 'yai_dbadmin'@'localhost' (using password: YES). but in my localhost perfome nicely. could someone please reveal something wrong?thank you

";

?>

Avatar
Arn
Hello Simkoko, Sorry for the problem with your database connection. Based on your error code, it appears that the user assigned to the database and being used for the database connection is unable to access the database. This is very commonly the result of a bad password. Check the user being used for the connection in the cPanel MySQL database section, or, create a new user, assign it to the database and then add it into the code for connecting to your database. If you need help with creating a database user, please see Creating a database user. We unfortunately are not developers that can provide code for you, but we do try to provide information that may help resolve your problem. Providing coding support is beyond the scope of our support. I hope this helps to answer your question, please let us know if you require any further assistance. Regards, Arnel C.