MySQL is an open source relational database management system that is among the most popular on the web. Typically, web hosting users access MySQL through their web-based control panel or through a free web application, such as phpMyAdmin. More advanced users may also manage MySQL from the command line via SSH.
A third option for MySQL management is remote administration. With this method, you can access MySQL from software on a remote computer. Some web development tools include an option for remote MySQL administration, and MySQL WorkBench also provides this functionality. Another reason to allow remote hosts to access MySQL is when you have a web server on a different IP address than your database server.
By default, no remote machines are allowed to access MySQL. This is a security measure. If a computer that is not on localhost attempts to access it, that computer will be denied. Fortunately, cPanel makes it easy to add trusted hosts to the list of accepted MySQL administrators. Just follow these instructions:
- Login to cPanel and scroll down to the section labeled “Databases”
- Click the button labeled “Remote MySQL”
- Enter the IP address or domain name you want to give access
- Click “Add host”
In addition to a full IP address, you can also use a wildcard. For example: 192.68.0.%. Any IP addresses that fits that wildcard will be allowed, so be careful with it. Also, if you are trying to access from home and have a dynamic IP address, you will need to change this setting whenever your IP address changes. Moreover, if you are accessing the database from a website on a shared hosting account, it may share its IP address with other sites. In that case, use the domain name.