Access mysql from a remote computer

After setting up a Linux server and install MySql as a database engine, we usually are restricted to the local users. For a WordPress or a Nextcloud installation, this is not an issue. But if you want to access the MySql database from another computer, using phpMyAdmin, you get an error.

To go around this error, and have access to the database, we need to change one parameter in the MySql configuration file:

cd /etc/mysql/mysql.conf.d

sudo nano mysqld.cnf

In the file, replace the bind-address from to, and mysql database can be accessed from anywhere.

Also, the user needs to have granted all privileges to a database in order to access it remotely.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s