Reputation: 61
I have been trying to connect to my database but can't connect. Just 3 days ago I purchased domain and hosting plan on GoDaddy. First thing I did was I downloaded my database from another account and tried to import to my new account. It gave me an error that database was not found to upload my table. So I created new database using GoDaddy's cPanel which allows us to create databases. Then I created users and added privileges to them. It clearly shows, in the below pictures, that user was created and added to database. But when I try to connect to my database by PHP script using pdo connection, it throw the below error.
[06-Aug-2018 06:15:17 UTC] PHP Fatal error: Uncaught PDOException: SQLSTATE[28000] [1045] Access denied for user 'cajetanF'@'ip-160-153-129-239.ip.secureserver.net' (using password: YES) in /home/ry91p8weag4x/public_html/Conn.php:9
Stack trace:
# 0 /home/ry91p8weag4x/public_html/Conn.php(9): PDO->__construct('mysql:host=sgva...', 'cajetanF', 'Cajetan')
# 1 {main}
thrown in /home/ry91p8weag4x/public_html/Conn.php on line 9
I am attached pictures below of the database.
There is an auto user given my phpMyAdmin I guess who has full access
but I just can't understand how to connect using that,
I tried connecting with that user but can't.
I just want to know what might be the password for that account to connect to my database.
Upvotes: 1
Views: 3312
Reputation: 944014
Your GRANT is giving permission to the user@localhost but the error message is telling you that they are @ip-160-153-129-239.ip.secureserver.net.
You have to give permission for the user to connect from the place they are connecting from.
Upvotes: 1