Databases 6 min read

Configure MySQL for Remote Access on Ubuntu 14.04

This step‑by‑step guide shows how to edit MySQL’s my.cnf on Ubuntu 14.04, change the bind‑address, restart the service, grant remote privileges, and verify the connection using Navicat, enabling secure remote database access.

Python Crawling & Data Mining
Python Crawling & Data Mining
Python Crawling & Data Mining
Configure MySQL for Remote Access on Ubuntu 14.04

After installing MySQL on Ubuntu 14.04, this tutorial explains how to configure it for remote connections.

1. The MySQL configuration file is located at /etc/mysql/my.cnf. It contains settings such as the user, listening port, and data directory.

2. Use cat /etc/mysql/my.cnf to view the file; the default bind-address is 127.0.0.1, which restricts connections to the local machine.

3. Edit my.cnf with vi or vim and change bind-address to 0.0.0.0 to allow external IPs.

4. Restart MySQL to apply changes: sudo service mysql restart.

5. Verify the MySQL process is running.

6. Find the server’s IP address (e.g., 192.168.255.131) with ifconfig and open Navicat.

7. Create a new connection in Navicat; the test will fail because remote privileges have not been granted.

8. Grant remote access using the SQL command:

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

9. Refresh privileges with flush privileges;.

10. Test the connection again in Navicat; it should now succeed.

11. The remote database appears in Navicat, and you can now manage it from the GUI.

12. Double‑click the connection to view database details and operate remotely.

With these steps, MySQL on Ubuntu is configured for remote access and can be managed through Navicat.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

mysqlDatabase ConfigurationRemote accessNavicat
Python Crawling & Data Mining
Written by

Python Crawling & Data Mining

Life's short, I code in Python. This channel shares Python web crawling, data mining, analysis, processing, visualization, automated testing, DevOps, big data, AI, cloud computing, machine learning tools, resources, news, technical articles, tutorial videos and learning materials. Join us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.