SQL database can't be accessed, despite there being a user with granted permissions.

joshglen

Registered
Mar 31, 2016
3
0
1
USA
cPanel Access Level
Root Administrator
I have been trying to transfer over a website that uses prestashop from my hosting provider to cpanel on another provider, and to a different domain.
I believe I have set up everything correctly, however when the website
loads, all it says is
Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user '(username)'@'(ip address)' (using password: YES)
However, I am positive that I added the correct user username and password, and have granted them all the permissions to settings.inc.php. I am using the settings.inc.php file from the old one, just modified. The original file had a database server that was not localhost, however when I changed it to localhost it just redirected me to the old site on the old domain (that is still being hosted on aplus.net).

I am not really sure what to do, so any help would be appreciated.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463

joshglen

Registered
Mar 31, 2016
3
0
1
USA
cPanel Access Level
Root Administrator
How do I use the script? I know I have to upload it to ftp, but where should I upload it to and how should I use it?
Thanks for any help that can be provided.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
It's simply a test script to verify your database login details are accurate. You can either paste the CODE into a new PHP file under public_html in File Manager, or upload it via FTP. Then, just edit the file via File Manager with your own database login details, and open it in your web browser to see if it successfully connects.

Thank you.