{"id":551,"date":"2021-08-23T15:05:00","date_gmt":"2021-08-23T15:05:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/uncategorized\/mysqlhow-to-grant-remote-access-mysql-vps\/"},"modified":"2026-03-10T10:12:27","modified_gmt":"2026-03-10T10:12:27","slug":"how-to-grant-remote-access-mysql","status":"publish","type":"post","link":"\/uk\/tutorials\/how-to-grant-remote-access-mysql","title":{"rendered":"How to grant MySQL remote connection using hPanel and MySQL server"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>A remote MySQL server helps you work more efficiently and keeps your data secure. It enhances accessibility, letting you and your team access the database from anywhere, which is perfect for remote working.<\/p><p>This setup improves MySQL database performance by not utilizing computer resources from the same local machine, resulting in faster and smoother operations. A remote server also includes security measures provided by the virtual server host, typically unavailable on a local server.<\/p><p>The MySQL server is also set to listen for local connections by default, disabling remote access to this database server.<\/p><p>To help you get started, this article will provide a step-by-step guide on establishing a remote connection to MySQL and conducting MySQL remote access setup on an Ubuntu server via <strong>hPanel<\/strong>.<\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/SSH-Cheat-Sheet-EN.pdf\" target=\"_blank\" rel=\"noopener\">Download ultimate SSH commands cheat sheet<\/a><\/p><p>\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-allow-mysql-remote-connection-in-hpanel\">How to allow MySQL remote connection in hPanel<\/h2><p>Before starting with this guide, ensure that you have access to the following:<\/p><ul class=\"wp-block-list\">\n<li>A <a href=\"\/uk\/tutorials\/what-is-cli\">command-line interface (CLI)<\/a> or terminal window to execute commands.<\/li>\n\n\n\n<li>Your remote MySQL server&rsquo;s IP address or hostname, port, and credentials.<\/li>\n\n\n\n<li>The required privileges as a root user on the MySQL server to create and manage databases.<\/li>\n<\/ul><p>Hostinger makes connecting to <a href=\"\/uk\/tutorials\/what-is-mysql\">MySQL<\/a> server remotely hassle-free with our graphical interface. Follow these steps to enable a remote database connection:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>Databases<\/strong> &rarr;<strong> Remote MySQL<\/strong> from <a href=\"\/support\/1583483-comprehensive-guide-to-hpanel-at-hostinger\/\">hPanel<\/a>.<\/li>\n\n\n\n<li>Enter the local IP address of a remote user that will connect to the server into the <strong>IP (IPv4 or IPv6)<\/strong> field. Alternatively, check the <strong>Any Host<\/strong> option to allow connection from any IP address.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-remote-database-connection.png\"><img decoding=\"async\" width=\"1024\" height=\"403\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-remote-database-connection-1024x403.png\" alt=\"The form to create a new MySQL database connection on hPanel\" class=\"wp-image-100224\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-1024x403.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-300x118.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-150x59.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-768x302.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection.png 1036w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Once done, click <strong>Create<\/strong>.<\/li>\n\n\n\n<li>Retrieve our MySQL host name and IP address from the top of the same page.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-remote-database-connection-hostname.png\"><img decoding=\"async\" width=\"1024\" height=\"407\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-remote-database-connection-hostname-1024x407.png\" alt=\"Locating Hostinger's server hostname on hPanel\" class=\"wp-image-100225\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-hostname-1024x407.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-hostname-300x119.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-hostname-150x60.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-hostname-768x306.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-hostname.png 1038w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol start=\"5\" class=\"wp-block-list\">\n<li>Your remote MySQL connections are listed under the <strong>Remote MySQL<\/strong> section. Hit <strong>Delete <\/strong>to remove a MySQL instance if needed.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-remote-database-connection-delete.png\"><img decoding=\"async\" width=\"1024\" height=\"242\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-remote-database-connection-delete-1024x242.png\" alt=\"A list of remote MySQL database connections highlighting the button to remove the entries\" class=\"wp-image-100226\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-delete-1024x242.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-delete-300x71.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-delete-150x35.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-delete-768x182.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-remote-database-connection-delete.png 1028w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-full\"><a href=\"\/uk\/web-hosting\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\" alt=\"Hostinger web hosting banner\" class=\"wp-image-98604\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/11\/Web-hosting_in-text-banner.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/11\/Web-hosting_in-text-banner-300x88.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/11\/Web-hosting_in-text-banner-150x44.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/11\/Web-hosting_in-text-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-how-to-grant-remote-connection-to-a-mysql-database-server\">How to grant remote connection to a MySQL database server<\/h2><p>For security reasons, you need a Secure Shell (SSH) connection to enable remote connections to your MySQL database server. <a href=\"\/uk\/tutorials\/ssh-tutorial-how-does-ssh-work\">SSH is a secure network protocol<\/a> that encrypts remote server access.<\/p><p>While it&rsquo;s not the only method to secure a remote MySQL database connection, SSH ensures a high level of security, making it a preferred choice for protecting data during transmission. This approach is critical when handling sensitive data or connecting on unsecured or public networks.<\/p><p>Windows users can <a href=\"\/uk\/tutorials\/how-to-use-putty-ssh\">use PuTTY<\/a>, a popular SSH client, to create an SSH tunnel. Meanwhile, Linux and macOS users have built-in terminal applications that support SSH. In all these cases, you&rsquo;ll be using a MySQL client to interact with your database server remotely.<\/p><p>If you are an existing or new user of <a href=\"\/uk\/vps-hosting\">Hostinger&rsquo;s VPS service<\/a>, find the server&rsquo;s login credentials under hPanel&rsquo;s<strong> VPS &rarr;<\/strong> <strong>SSH access<\/strong> tab or use the integrated <strong>Browser terminal<\/strong>.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-vps-browser-terminal.png\"><img decoding=\"async\" width=\"1024\" height=\"500\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-vps-browser-terminal-1024x500.png\" alt=\"Hostinger VPS hosting dashboard highlighting access to Browser terminal\" class=\"wp-image-100227\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-vps-browser-terminal-1024x500.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-vps-browser-terminal-300x146.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-vps-browser-terminal-150x73.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-vps-browser-terminal-768x375.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-vps-browser-terminal.png 1027w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/uk\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner-1024x300.png\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-300x88.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-150x44.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/02\/VPS-hosting-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-1-edit-the-mysql-configuration-file-for-remote-access\">1. Edit the MySQL configuration file for remote access<\/h3><p>The first step is to make the remote MySQL server listen for external connections by adding an extra option to the configuration file.<\/p><p>To do this, log in to your server as a root MySQL user and connect to the MySQL command line. Run the following command to determine the location of the MySQL configuration file:<\/p><pre class=\"wp-block-preformatted\">mysql --help | grep \"Default options\" -A 1<\/pre><p>The output should look like this:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/output-locate-mysql-configuration-file.png\"><img decoding=\"async\" width=\"704\" height=\"62\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/output-locate-mysql-configuration-file.png\" alt=\"Locating the MySQL configuration file through CLI\" class=\"wp-image-100228\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/output-locate-mysql-configuration-file.png 704w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/output-locate-mysql-configuration-file-300x26.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/output-locate-mysql-configuration-file-150x13.png 150w\" sizes=\"(max-width: 704px) 100vw, 704px\" \/><\/a><\/figure><\/div><p>Next, open and edit the MySQL config file using <strong>nano<\/strong>, a text editor for Unix-like systems with a command-line interface:<\/p><pre class=\"wp-block-preformatted\">nano \/etc\/my.cnf<\/pre><p>Once the file opens, locate the line that contains the <strong>[mysqld]<\/strong> label and add the following code:<\/p><pre class=\"wp-block-preformatted\">bind-address=server_IP<\/pre><p>Replace<strong> server_ip<\/strong> with the remote server IP address to limit connections. Avoid setting the <strong>bind-address<\/strong> value to <strong>0.0.0.0<\/strong>, as it enables any IPv4 address to access the MySQL servers, increasing the risk of unauthorized access.<\/p><p>If the MySQL config file has a line containing<strong> skip-networking<\/strong>, remove it or mark it as a comment by adding <strong># <\/strong>at the beginning of the line. This directive, when active, makes the MySQL server not listen for TCP\/IP connections, effectively disabling remote access.<\/p><p>After editing the file, save it by pressing <strong>CTRL+X<\/strong>. To apply the changes, restart the MySQL service using the following command:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl restart mysql<\/pre><h3 class=\"wp-block-heading\" id=\"h-2-open-the-required-mysql-port\">2. Open the required MySQL port<\/h3><p>The default MySQL port for external connections is port <strong>3306<\/strong>. If you have a firewall configured on your MySQL server, you&rsquo;ll need to allow traffic through this specific port to enable access from remote machines.<\/p><p>Hostinger users on KVM VPS plans can add new firewall rules directly from hPanel by navigating to <strong>Security <\/strong>&rarr; <strong>Firewall<\/strong>. Select <strong>Create firewall configuration<\/strong>, name it, and click <strong>Edit <\/strong>to configure it.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-firewall.png\"><img decoding=\"async\" width=\"1024\" height=\"528\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-firewall-1024x528.png\" alt=\"Hostinger VPS firewall settings highlighting the Edit option\" class=\"wp-image-100229\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-1024x528.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-300x155.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-150x77.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-768x396.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall.png 1084w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>This tutorial uses the <a href=\"\/uk\/tutorials\/tcp-protocol\">Transmission Control Protocol (TCP)<\/a> and port number <strong>3306<\/strong>. The source is set to <strong>Custom<\/strong>, allowing incoming traffic only from a specific IP address. Once you&rsquo;re done setting up the remote database connection configuration, click <strong>Add rule<\/strong>.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-firewall-configuration.png\"><img decoding=\"async\" width=\"1024\" height=\"480\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hpanel-firewall-configuration-1024x480.png\" alt=\"Setting up a new firewall rule in hPanel\" class=\"wp-image-100230\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-configuration-1024x480.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-configuration-300x141.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-configuration-150x70.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-configuration-768x360.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2023\/12\/hpanel-firewall-configuration.png 1044w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>Alternatively, open hPanel&rsquo;s <strong>Browser terminal<\/strong> and use the following command to restrict access to a specific remote IP address using<strong> <\/strong><a href=\"\/uk\/tutorials\/iptables-tutorial\">iptables<\/a>, a widely used firewall tool by the Linux kernel. Proceed with securing remote access by replacing <strong>remote_IP_address<\/strong> with the actual IP address of the remote MySQL host:<\/p><pre class=\"wp-block-preformatted\">iptables -A INPUT -i eth0 -s remote_IP_address -p tcp --dport 3306 -j ACCEPT<\/pre><p>Omitting <strong>-s remote_IP_address<\/strong> from the syntax opens port <strong>3306 <\/strong>for unrestricted traffic. Be careful with this setting, as it increases the risk of unauthorized access.<\/p><p>Save the<strong> iptables<\/strong> configuration by entering:<\/p><pre class=\"wp-block-preformatted\">iptables-save &gt; \/etc\/sysconfig\/iptables<\/pre><h3 class=\"wp-block-heading\" id=\"h-3-connect-to-the-remote-mysql-server\">3. Connect to the remote MySQL server<\/h3><p>After configuring your MySQL server to allow remote connections, users from the specified IP address can set up a new connection from a remote machine. To do so, enter the following command in your terminal:<\/p><pre class=\"wp-block-preformatted\">mysql -u username -h mysql_server_ip -p<\/pre><p>Replace <strong>username <\/strong>with your MySQL username and <strong>mysql_server_ip<\/strong> with your MySQL server&rsquo;s IP address or hostname. The <strong>-p<\/strong> parameter enables password authentication, prompting you to enter the password for the specified user account.<\/p><p>Next, enter the password value for the MySQL user account. If the connection is successful, you will enter the MySQL command-line interface, indicated by a <strong>mysql&gt;<\/strong> prompt. Once connected, you can specify the database name you wish to work with using the command below:<\/p><pre class=\"wp-block-preformatted\">USE database_name;<\/pre><p>You can then start executing commands and interacting with the MySQL database remotely.<\/p><p>Run a simple query to test the MySQL database interaction. For example, this basic command lists all databases available to your user account:<\/p><pre class=\"wp-block-preformatted\">SHOW DATABASES;<\/pre><p>Exit the MySQL command-line interface by typing:<\/p><pre class=\"wp-block-preformatted\">exit<\/pre><h2 class=\"wp-block-heading\" id=\"h-troubleshooting-mysql-remote-connection-issues\">Troubleshooting MySQL remote connection issues<\/h2><p>Follow these steps if you&rsquo;re having trouble establishing a remote MySQL link:<\/p><ol class=\"wp-block-list\">\n<li><strong>Check the MySQL server status<\/strong> &#8210; use the command <strong>sudo service mysql status<\/strong> to check if the MySQL server is running.<\/li>\n\n\n\n<li><strong>Verify network connectivity<\/strong> &#8210; ping your server&rsquo;s IP address using the command <strong>ping mysql_server_ip<\/strong> to check for network issues.<\/li>\n\n\n\n<li><strong>Confirm remote MySQL user privileges<\/strong> &#8210; use the command <strong>SHOW GRANTS FOR &lsquo;username&rsquo;@&rsquo;localhost&rsquo;; <\/strong>to check whether the MySQL user you&rsquo;re using has the correct authorization. Check out our article on <a href=\"\/uk\/tutorials\/mysql\/how-create-mysql-user-and-grant-permissions-command-line\">creating MySQL users and granting privileges<\/a> for more information.<\/li>\n\n\n\n<li><strong>Check firewall settings<\/strong> &#8210; if you are setting up an SSH tunnel for your MySQL connection, add your hosting provider&rsquo;s dedicated SSH port to the firewall rules.<\/li>\n\n\n\n<li><strong>Verify MySQL server hostname and credentials<\/strong> &#8210; double-check the server&rsquo;s IP address or hostname, username, and password for typos.<\/li>\n\n\n\n<li><strong>Seek assistance <\/strong>&#8210; if you&rsquo;re still stuck, Hostinger&rsquo;s <a href=\"\/blog\/vps-ai-assistant\">Kodee AI assistant<\/a> and 24\/7 Customer Success team are ready to help.<\/li>\n<\/ol><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Setting up a remote connection to a MySQL database lets you access and manage your MySQL databases from anywhere, enhancing remote teams&rsquo; efficiency. It also improves your database&rsquo;s performance and keeps it safe from unauthorized access and network attacks.<\/p><p>Hostinger simplifies enabling MySQL remote access through hPanel with a user-friendly firewall configuration tool and an integrated <strong>Browser terminal<\/strong> for ease of use.<\/p><p>Here&rsquo;s a quick recap of the steps to allow remote connection to MySQL if you&rsquo;re not using Hostinger&rsquo;s built-in tools:<\/p><ol class=\"wp-block-list\">\n<li>Change the MySQL server configuration file for remote access.<\/li>\n\n\n\n<li>Ensure the standard MySQL port <strong>3306<\/strong> is open for connections.<\/li>\n\n\n\n<li>Connect to the MySQL server and test the connection.<\/li>\n<\/ol><p>We hope this article helped your understanding of remote MySQL connection and how to leverage it for a better workflow. Leave a comment below if you have any questions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A remote MySQL server helps you work more efficiently and keeps your data secure. It enhances accessibility, letting you and your team access the database from anywhere, which is perfect for remote working. This setup improves MySQL database performance by not utilizing computer resources from the same local machine, resulting in faster and smoother operations. [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/uk\/tutorials\/how-to-grant-remote-access-mysql\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Allow MySQL Remote Connection in %currentyear%","rank_math_description":"Hostinger makes MySQL remote connection server easy with our graphical interface. Follow this article to enable a remote database connection.","rank_math_focus_keyword":"mysql remote connection","footnotes":""},"categories":[22640],"tags":[],"class_list":["post-551","post","type-post","status-publish","format-standard","hentry","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-grant-remote-access-mysql","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/como-liberar-acesso-remoto-mysql","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/connexion-a-distance-mysql","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-conceder-conexion-remota-a-mysql","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-remote-mysql-untuk-membuat-koneksi","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-grant-remote-access-mysql","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-conceder-conexion-remota-a-mysql","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-conceder-conexion-remota-a-mysql","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-conceder-conexion-remota-a-mysql","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/como-liberar-acesso-remoto-mysql","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-grant-remote-access-mysql","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-grant-remote-access-mysql","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-grant-remote-access-mysql","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-grant-remote-access-mysql","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-grant-remote-access-mysql","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-grant-remote-access-mysql","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/comments?post=551"}],"version-history":[{"count":26,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/551\/revisions"}],"predecessor-version":[{"id":129260,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/551\/revisions\/129260"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/media?parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/categories?post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/tags?post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}