If you need to access your database from an external source, you must enable remote connections for MySQL.
On servers running Plesk Panel, you can enable it by following the steps below.
NOTE: On some operating systems, the configuration file may be located at
Locate the following lines:
Comment them out by adding a “#” at the beginning:
NOTE: In some
These changes will allow MySQL to accept external (remote) connections.
If your system uses mysql or mariadb instead of mysqld, try the following:
or
On servers running Plesk Panel, you can enable it by following the steps below.
🔧 1. Connect via SSH and Edit MySQL Configuration
Bash:
nano /etc/my.cnf
/etc/mysql/my.cnf instead.Locate the following lines:
Code:
bind-address
skip-networking
Comment them out by adding a “#” at the beginning:
Bash:
#bind-address
#skip-networking
my.cnf files, skip-networking may not exist. If that’s the case, no additional action is needed.These changes will allow MySQL to accept external (remote) connections.
🔁 2. Restart the MySQL Service
Bash:
service mysqld restart
Bash:
service mysql restart
Bash:
service mariadb restart