1

I am web developer and i just wonder Why i can't connect to mysql database on almost all my website with command line (all of theme use cpanel) and when i saw that port 3306 is closed !!

How could i connect theme with mysql command ?

Why mysql port is shown closed ? How it work if it's port is closed ?

Is that something Cpanel do ?

my command is :

mysql -h remoteipaddress -u username -pmypassword -D mydatabase

2 Answers 2

0

Remote MySQL connections are disabled by default in cPanel servers because they are considered a potential security threat. Using the tools in the Web Host Manager (WHM) and the domain-level cPanel interface (usually http://domainname.com/cpanel) remote hosts can be added which the server allows to connect to the MySQL service.

0

I use SQLyog to connect to remote hosts. And this link - https://answers.syr.edu/display/ischool/Enable+Remote+MySQL+on+cPanel - gives the steps to connect to the MySQL database remotely when using cpanel.

You must log in to answer this question.