• I just finished learning how to connect my .PHP website to MySQL database in a localhost environment in Xampp & I was able to successfully connect. Now I am trying to apply my skills to a live website in cPanel phpMyAdmin but I am not having any success. I am getting this error message:

    Error: Unable to connect to MySQL.

    Debugging errno: 1045

    Debugging error: Access denied for user ‘mydatabasename’@’localhost’ (using password: YES).

    How can I get help resolving this issue? I [redacted]

    Thank you

    • This topic was modified 1 year, 4 months ago by bcworkz.
Viewing 1 replies (of 1 total)
  • Moderator threadi

    (@threadi)

    Please do not offer money for answers in the forum in the future. See also the Forum Guidelines: https://ww.wp.xz.cn/support/guidelines/#do-not-offer-to-pay-for-help

    Your question has practically nothing to do with WordPress itself. I would rather recommend that you contact a developer community such as https://stackoverflow.com. However, the following instructions will ensure that a connection to an external server works:

    • You need to know under which port the external database server can be reached. For MySQL it is normally 3306, but this can also be changed by the hosting.
    • No firewall may block the path to the database port on the external server. If necessary, the firewall must be configured accordingly.
    • The external database server itself must be configured to allow external connections. For security reasons, this is rarely the case nowadays.
    • The external database server must have a suitable user configuration for incoming requests. For security reasons, this is rarely the case nowadays.
    • The server from which you establish the connection must not have a firewall that blocks the database port. This is also a security aspect for outgoing connections.

    There are also a few other things to consider. If you have any questions, I would recommend contacting the support of the hoster where the external database server is located.

    • This reply was modified 1 year, 4 months ago by threadi.
Viewing 1 replies (of 1 total)

The topic ‘Connecting To A Live Website MySQL Database’ is closed to new replies.