Skip to main content

Try to connect with php-mysqli to external mysql database (non-cpanel)

Comments

2 comments

  • cPanelAnthony
    Hello! In order for remote MySQL to work with cPanel, some additional work needs to be done. Any of the following articles might help. Also, you will want to ensure that port 3306 is open inbound on the server being connected to, and outbound on the server you're connecting from.
    0
  • Travis-NS
    Hello, if you're trying to connect externally from a cPanel to server to another server running a MySQL, make sure the server firewall allows external connections. For example, if you're using CSF, add port 3309 to TCP_OUT. If you don't have access to CSF, ask your host or whoever manages your server to check and make that change for you.
    0

Please sign in to leave a comment.