Skip to main content

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

Comments

5 comments

  • cPanelMichael
    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).

    Hello :) Are you sure the file you are editing is intended for the database login information? If so, try using a test script with those same MySQL login details to verify it's working: Script for a quick PHP MySQL DB connection test. " GitHub Thank you.
    0
  • joshglen
    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.
    0
  • cPanelMichael
    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.
    0
  • joshglen
    Neither the ftp nor the cpanel file manager gives me the option to open it. How should I go about doing that?
    0
  • cPanelMichael
    You can download the file via FTP, edit it, and upload the file with the changed values. Or, use the "Code Edit" option in File Manager:
    0

Please sign in to leave a comment.