By default, MySQL only allows connections from the localhost address. The configuration file is usually found in /etc/mysql/my.cnf

You will want to comment out the bind-address line by making it look like this:

#bind-address     =

Next, you will need to restart the database server:

sudo /etc/init.d/mysql restart

Profile Photo for Lowell Heddings Lowell Heddings
Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work.
Read Full Bio »

The above article may contain affiliate links, which help support How-To Geek.