Sarvap Praharanayuthan

One who uses everything as his weapon!

How to enable remote access to MySQL database on Ubuntu Machine

mysql logo

In this article we shall see the steps to enable remote access to MySQL database which is available on a Ubuntu machine.

Step 1 – Allow connections to clients other than localhost in MySQL Configuration file

Allow MySQL connections from other clients in the configuration file. The MySQL configuration file will be available at /etc/mysql/mysql.conf.d directory and the file name will be mysqld.cnf. By default MySQL is set to allow connections only from localhost i.e 127.0.0.1, we need to change this to 0.0.0.0 to allow connections from other clients.

Change,

bind-address = 127.0.0.1

to

bind-address = 0.0.0.0

 

Step 2 – Whitelist client IP address in the Ubuntu Machine’s firewall

The ubuntu machine comes with Ubuntu Firewall and by default it does not allow incoming connection of MySQL port – 3306. Therefore we need to open the port for the client’s specific IP address or to all IP addresses if your client does not have a fixed IP address.

Let’s assume your client’s IP address as 50.75.120.81. On your terminal, the following line will allow incoming connections to port number 3306 from client with IP address 50.75.120.81:

ufw allow from 50.75.120.81 to any port 3306

If your client has no fixed IP address or if you need to permit all IP addresses (not-recommended as anyone can attempt to connect to 3306),

ufw allow 3306
How to enable remote access to MySQL database on Ubuntu Machine

43 thoughts on “How to enable remote access to MySQL database on Ubuntu Machine

  1. I’ve been browsing online more than 2 hours today, yet I never found any interesting article like
    yours. It is pretty worth enough for me. In my opinion, if all web
    owners and bloggers made good content as you did, the net will be a lot more
    useful than ever before.

  2. Great goods from you, man. I have be aware your stuff previous to and you are simply too wonderful.
    I really like what you have obtained right here, really like what you’re stating and the best way
    by which you say it. You make it enjoyable and you still care
    for to stay it sensible. I cant wait to read far more from you.
    This is really a terrific website.

  3. Hi there! This article couldn’t be written any better!
    Reading through this post reminds me of my previous roommate!
    He continually kept talking about this. I’ll forward this article to him.
    Fairly certain he will have a very good read. Thank you for
    sharing!

    my website :: zgarciog01

  4. Nice post. I learn something totally new and challenging on sites I stumbleupon on a daily
    basis. It’s always exciting to read content from other writers and practice something from other websites.

    Review my web blog: Larimar Jewelry

  5. I’ve been exploring for a bit for any high-quality articles or blog posts on this kind of house .
    Exploring in Yahoo I at last stumbled upon this website.

    Studying this info So i’m satisfied to show that I have a very good
    uncanny feeling I came upon exactly what I needed.
    I such a lot indisputably will make sure to don?t omit this web site and provides
    it a look regularly.

    Feel free to visit my web blog Larimar Jewelry

  6. I don’t even know how I ended up here, however I believed this submit was great.

    I do not realize who you’re but certainly you’re going to a famous blogger in case you aren’t
    already. Cheers!

    Feel free to visit my blog post :: Larimar Jewelry

  7. Hey just wanted to give you a brief heads
    up and let you know a few of the images aren’t loading properly.
    I’m not sure why but I think its a linking issue.
    I’ve tried it in two different web browsers and both show the same results.

    Visit my site :: Larimar Jewelry

  8. I’m really enjoying the design and layout of your website.
    It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire
    out a developer to create your theme? Great work!

    Also visit my site; Larimar Jewelry

  9. I just like the valuable info you provide to your articles.
    I’ll bookmark your weblog and test again right here regularly.
    I’m moderately certain I will learn many new stuff right right
    here! Best of luck for the following!

    Feel free to surf to my web blog Larimar Jewelry

  10. Please let me know if you’re looking for a writer for your weblog.
    You have some really great posts and I believe I would be a good
    asset. If you ever want to take some of the load off, I’d love to write some articles
    for your blog in exchange for a link back to mine. Please shoot me an email if interested.

    Many thanks!

    Feel free to visit my webpage … Larimar Jewelry

  11. Today, I went to the beach front with my kids.
    I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed.
    There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is completely off
    topic but I had to tell someone!

    Here is my web blog; Larimar Jewelry

  12. Just wish to say your article is as astonishing. The clearness in your post is just excellent and i
    can assume you’re an expert on this subject.
    Well with your permission let me to grab your RSS feed to keep up to date with forthcoming post.
    Thanks a million and please carry on the enjoyable work.

    My web blog :: Larimar Jewelry

  13. Hey there this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you
    have to manually code with HTML. I’m starting a blog soon but have no coding expertise so I wanted to get guidance from
    someone with experience. Any help would be enormously appreciated!

    Also visit my site … Larimar Jewelry

  14. It’s a shame you don’t have a donate button! I’d certainly donate to this fantastic
    blog! I guess for now i’ll settle for bookmarking and adding your RSS feed to my Google account.
    I look forward to brand new updates and
    will talk about this site with my Facebook group. Talk soon!

    Here is my web site: Larimar Jewelry

  15. Hi, I do believe this is a great blog. I stumbledupon it 😉 I am going to revisit
    yet again since i have book marked it. Money and freedom is the best way to change, may you be rich
    and continue to help other people.

    Also visit my web site :: fuite sur le toit

  16. The other day, while I was at work, my sister stole my iPad and tested to see if it
    can survive a thirty foot drop, just so she can be a youtube sensation.
    My apple ipad is now broken and she has 83 views.

    I know this is completely off topic but I had to share it with someone!

    Feel free to visit my website :: 해외선물 대여업체

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top