How to set up external MySQL connection
In today's world almost all the businesses are using the website and web hosting services for their business and the reason behind it is that today a lot of people are using the internet service. So today if you have a website then you can easily showcase your business product and services to the people around you and also to the people across the globe. Moreover, today using a server for those websites who are having high web traffic is one of the best solutions where you will have very less downtime and also very less loading issues. Not only that with servers you also get more resources than in shared hosting environment.
And in a dedicated host, you will not share your resources with other websites. So there is very less chance that your server will be affected by a virus or any security breach. So today if you are using a server for your website and if you are looking for information on how to set up external MySQL connection on a server then here is the complete information on it. Before that you need to create a database. And to enable connections to your MySQL database from a location other than your server, you need to enable non-localhost connections.
Follow the below steps to set up external MySQL connection on a server:
>> Log into SSH
>> Log into MySQL
>> Now use this command
mysql -u admin -p`cat /etc/psa/.psa.shadow`
>> Now if you are trying to grant non-localhost access to a user, then use this command
GRANT ALL PRIVILEGES ON dbname.* TO username@'IP' IDENTIFIED BY 'password';
>> Now apply these changes by using the MySQL command
>> Next quit MySQL by using this command:
>> Somtimes you may need to allow the source IP from which you are connecting to port 3306 at that time use this command
iptables -I INPUT -s <SOURCE IP ADDRESS> -p tcp --dport 3306 -j ACCEPT
You can also set it via cPanel
>> Log into WHM
>> Go to SQL Services
>> Click on Additional MySQL Access Hosts
>> Here you can set up external MySQL connection
Now you go to your cPanel
>> Go to Remote MySQL
>> Type in the hostname or IP
>> Click on Add Host
So today if you are looking for the best MySQL hosting solution for your business then you are at right place. Here at HostingRaja we provide best in class MySQL hosting solution at an affordable price, with amazing features, offers and discounts. Not only that if you are planning to use LAMP web application for your business then MySQL is the right choice. With our MySQL hosting you can easily implement the database with its tables, columns and indexes. We also provide 99.9% server uptime with 24/7 customer support via phone, chat, email and ticket system.