{"id":293,"date":"2016-05-02T18:40:13","date_gmt":"2016-05-02T18:40:13","guid":{"rendered":"http:\/\/www.copahost.com\/blog\/?p=293"},"modified":"2020-05-31T14:22:13","modified_gmt":"2020-05-31T14:22:13","slug":"grant-mysql-remote-access","status":"publish","type":"post","link":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/","title":{"rendered":"How to grant MySQL remote access: in Linux and Windows"},"content":{"rendered":"<p>Firstly, by default MySQL is installed only listening to localhost. It&#8217;s closed so that it won&#8217;t listen to your public IPs externally. This tutorial works both for Ubuntu, Debian and CentOS. To <a href=\"https:\/\/www.copahost.com\/blog\/mysql-grant-all-privileges-how-to-manage-user-privileges\/\" >grant mysql<\/a> remote access, we need to first of all open the MySQL to listen to external connections, and then, enable the user for remote networks. It&#8217;s very easy and simple to allow remote connections in MySQL<\/p>\n<h3>Step 1 &#8211; Allow remote connections to the MySQL server<\/h3>\n<p>Before grant <a href=\"https:\/\/www.copahost.com\/blog\/list-mysql-users\/\" >mysql remote access<\/a>, it&#8217;s necessary to open the server port 3306.<\/p>\n<p>First, we will update our system and install <strong>Nmap<\/strong>. This utility shows the currently opened ports in the server. In this article, we will show how to allow remote connections both in centos, ubuntu and windows.<\/p>\n<p>Linux Ubuntu\/Debian:<\/p>\n<pre class=\"lang:default decode:true \">sudo apt-get update\r\nsudo apt-get install nmap<\/pre>\n<p>In CentOS:<\/p>\n<pre class=\"lang:default decode:true \">yum -y install nmap<\/pre>\n<p>Now\u00a0we will run nmap to make sure mysql isn&#8217;t listening in our public IP. Make sure to replace<strong> [server-ip]<\/strong> with your public server IP.<\/p>\n<pre class=\"lang:default decode:true\">nmap\u00a0[server-ip]<\/pre>\n<p>The output should be something like:<\/p>\n<pre class=\"lang:default decode:true \">Starting Nmap 6.40 ( http:\/\/nmap.org ) at 2016-05-02 18:50 BST\r\nNmap scan report for teste2.copahost.com (177.85.98.201)\r\nHost is up (0.0000090s latency).\r\nNot shown: 998 closed ports\r\nPORT STATE SERVICE\r\n22\/tcp open ssh\r\n80\/tcp open http\r\n\r\nNmap done: 1 IP address (1 host up) scanned in 2.40 seconds<\/pre>\n<p>As we can see,\u00a0there is no server daemon opened on port 3306, and we need to configure MySQL to listen in our public IP.<\/p>\n<p>Let&#8217;s edit our <strong>my.cnf<\/strong> file<\/p>\n<pre class=\"lang:default decode:true\">\u00a0pico \/etc\/mysql\/my.cnf<\/pre>\n<p>Now you must\u00a0find this line:<\/p>\n<pre class=\"lang:default decode:true\">bind-address = 127.0.0.1<\/pre>\n<p>And replace with:<\/p>\n<pre class=\"lang:default decode:true\">bind-address = 0.0.0.0<\/pre>\n<p>Also, make sure this line is commented (with a # in the beginning):<\/p>\n<pre class=\"lang:default decode:true \"># skip-networking<\/pre>\n<p>This will tell MySQL to listen in both localhost (127.0.0.1) and in the public IP of the server.<\/p>\n<p>After finishing, type CTRL+X to exit, and Y to save.<\/p>\n<p>Now you\u00a0must restart the MySQL server. This restart process may be different according to your Linux distro.<\/p>\n<p>Debian 7 and older<\/p>\n<pre class=\"lang:default decode:true\"> \/etc\/init.d\/mysqld stop\r\n \/etc\/init.d\/mysqld start<\/pre>\n<p>Ubuntu 14 and newer<\/p>\n<pre class=\"lang:default decode:true\">sudo stop mysql\r\nsudo start mysql<\/pre>\n<p>CentOS 6.x and older:<\/p>\n<pre class=\"lang:default decode:true\">service mysqld stop\r\nservice mysqld start<\/pre>\n<p>CentOS 7.x and Debian 8:<\/p>\n<pre class=\"lang:default decode:true \">systemctl mysqld stop\r\nsystemctl mysqld start<\/pre>\n<p>Let&#8217;s run nmap again to confirm if the port 3306 is opened in the public IP:<\/p>\n<pre class=\"lang:default decode:true\"># nmap 177.85.98.201\r\n\r\nStarting Nmap 6.40 ( http:\/\/nmap.org ) at 2016-05-02 19:01 BST\r\nNmap scan report for teste2.copahost.com (177.85.98.201)\r\nHost is up (0.000011s latency).\r\nNot shown: 997 closed ports\r\nPORT STATE SERVICE\r\n22\/tcp open ssh\r\n80\/tcp open http\r\n3306\/tcp open mysql\r\n\r\nNmap done: 1 IP address (1 host up) scanned in 2.39 seconds<\/pre>\n<p>We can see <strong>3306\/tcp open mysql<\/strong>, which means that the MySQL port is opened and waiting for connections.<\/p>\n<p>To test, we will use HeidiQSL, which is a freeware <a href=\"https:\/\/www.copahost.com\/blog\/connect-openvpn-client-windows\/\" >Windows MySQL client<\/a>, and we will try to connect to our server:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-294\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/grant-mysql-remote-access-1.jpg\" alt=\"grant mysql remote access 1\" width=\"683\" height=\"412\" \/><\/p>\n<p>We will get an error message because we haven&#8217;t granted the privileges to the <a href=\"https:\/\/www.copahost.com\/blog\/list-mysql-users\/\" >user to access<\/a> remotely yet.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-295 size-full\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/grant-mysql-remote-access-2.jpg\" alt=\"grant mysql remote access 2\" width=\"360\" height=\"163\" \/><\/p>\n<h3>Step 2 &#8211; Grant remote access to MySQL users<\/h3>\n<p>To solve this issue, we must grant the remote <a href=\"https:\/\/www.copahost.com\/blog\/list-mysql-users\/\" >access privileges to our myqsl user<\/a>. So you must open connect to mysql locally:<\/p>\n<pre class=\"lang:default decode:true\">mysql -u root -p<\/pre>\n<p>Now we will grant the privileges using the command &#8220;GRANT ALL PRIVILEGES&#8221;. Please note that even if the username is already configured for the localhost access, we will have to set a new password for it to connect remotely. You must replace<strong> [username]<\/strong> and <strong>[new-password]<\/strong> in this command.<\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON *.* TO '[user-name]'@'%' \u00a0 \u00a0 \u00a0\r\nIDENTIFIED BY '[new-password]';\r\nFLUSH PRIVILEGES;<\/pre>\n<p>This command will ensure all the IP addresses can connect to the server using this username and password. We will explain how to limit and restrict access to certain IPs or networks.<\/p>\n<p>Now you should be able to connect to the remote MySQL server using the configured username and password.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-296\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/grant-mysql-remote-access-3.jpg\" alt=\"grant mysql remote access 3\" width=\"700\" height=\"343\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Grant remote access to specific IPs or networks<\/h3>\n<p>To restrict the IP or network, you should replace the % (wildcard) with the IP or block.<\/p>\n<p>Examples:<\/p>\n<p>This will only allow connections from the IP <strong>177.85.98.15<\/strong><\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON *.* TO '[user-name]'@'177.85.98.15' \u00a0 \u00a0 \u00a0\r\nIDENTIFIED BY '[new-password]';\r\nFLUSH PRIVILEGES;<\/pre>\n<p>This will allow connections from the IP range \u00a0<strong>177.85.98.1<\/strong> \u00a0to \u00a0<strong>177.85.98.254<\/strong><\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON *.* TO '[user-name]'@'177.85.98.%' \u00a0 \u00a0 \u00a0\r\nIDENTIFIED BY '[new-password]';\r\nFLUSH PRIVILEGES;<\/pre>\n<p>Now, this example grant <a href=\"https:\/\/www.copahost.com\/blog\/list-mysql-users\/\" >mysql remote access<\/a> to any hostname ending in <strong>*.myprovider.com<\/strong><\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON *.* TO '[user-name]'@'%.myprovider.com' \u00a0 \u00a0 \u00a0\r\nIDENTIFIED BY '[new-password]';\r\nFLUSH PRIVILEGES;<\/pre>\n<p>To allow access from any network, without restriction, you should keep only the % (wildcard). This will\u00a0grant <a href=\"https:\/\/www.copahost.com\/blog\/list-mysql-users\/\" >mysql remote access<\/a> to any IP or network.<\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON *.* TO '[user-name]'@'%' \u00a0 \u00a0 \u00a0\r\nIDENTIFIED BY '[new-password]';\r\nFLUSH PRIVILEGES;<\/pre>\n<h3>Grant mysql remote access to specific MySQL databases and tables<\/h3>\n<p>To restrict the access to a specific database or table, you should replace the *.* with: [database].[table]<\/p>\n<p>This allows access <strong>only to the mydb database<\/strong>, with any table:<\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON mydb.* TO '[user-name]'@'%' \u00a0 \u00a0 \u00a0\r\nIDENTIFIED BY '[new-password]';\r\nFLUSH PRIVILEGES;<\/pre>\n<p>This command grants access only to the <strong>table clients<\/strong>, inside the <strong>mydb database<\/strong>:<\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON mydb.clients TO '[user-name]'@'%' \u00a0 \u00a0 \u00a0\r\nIDENTIFIED BY '[new-password]';\r\nFLUSH PRIVILEGES;<\/pre>\n<p>If you need to grant access specifically to more than one table, then you should run the command more than once:<\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON mydb.table1 TO '[user-name]'@'%' \r\nIDENTIFIED BY '[new-password]';\r\nGRANT ALL PRIVILEGES ON mydb.table2 TO '[user-name]'@'%'      \r\nIDENTIFIED BY '[new-password]';\r\nGRANT ALL PRIVILEGES ON mydb.table3 TO '[user-name]'@'%'      \r\nIDENTIFIED BY '[new-password]';\r\nFLUSH PRIVILEGES;<\/pre>\n<h3>Grant option<\/h3>\n<p>You can also allow such user to be able to delegate and grant privileges to other users, by adding<strong> WITH GRANT OPTION<\/strong> to the end of the command.<\/p>\n<p>It would look like:<\/p>\n<pre class=\"lang:default decode:true\">GRANT ALL PRIVILEGES ON *.* TO '[user-name]'@'%' \u00a0 \u00a0 \u00a0\r\nIDENTIFIED BY '[new-password]' \r\nWITH GRANT OPTION;\r\nFLUSH PRIVILEGES;<\/pre>\n<p>If you need to recover the mysql user password, you can also read\u00a0<a href=\"https:\/\/www.copahost.com\/blog\/reset-mysql-root-password-ubuntu\/\">this article<\/a>.<\/p>\n<h3>Conclusion<\/h3>\n<p>It&#8217;s simple to allow MySQL remote connections to a database. But be warned that you need to specify the desired hostname or IPs that have access to it. Also, it&#8217;s important to allow such connections in port 3306 in your firewall.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firstly, by default MySQL is installed only listening to localhost. It&#8217;s closed so that it won&#8217;t listen to your public IPs externally. This tutorial works both for Ubuntu, Debian and CentOS. To grant mysql remote access, we need to first of all open the MySQL to listen to external connections, and then, enable the user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1847,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[102,99,98,100,39,97,101],"class_list":["post-293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-external-mysql","tag-flush-privileges","tag-grant","tag-grant-option","tag-mysql","tag-remote","tag-remote-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to grant MySQL remote access: in Linux and Windows - Copahost<\/title>\n<meta name=\"description\" content=\"How to allow MySQL remote connections. Grant MySQL remote access. Applies both for Linux and Windows. Specify IP or Hosts to allow incomming connections.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to grant MySQL remote access: in Linux and Windows - Copahost\" \/>\n<meta property=\"og:description\" content=\"How to allow MySQL remote connections. Grant MySQL remote access. Applies both for Linux and Windows. Specify IP or Hosts to allow incomming connections.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/\" \/>\n<meta property=\"og:site_name\" content=\"Copahost\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-02T18:40:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-31T14:22:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"823\" \/>\n\t<meta property=\"og:image:height\" content=\"429\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gustavo Gallas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gustavo Gallas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/\"},\"author\":{\"name\":\"Gustavo Gallas\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246\"},\"headline\":\"How to grant MySQL remote access: in Linux and Windows\",\"datePublished\":\"2016-05-02T18:40:13+00:00\",\"dateModified\":\"2020-05-31T14:22:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/\"},\"wordCount\":740,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg\",\"keywords\":[\"external mysql\",\"flush privileges\",\"grant\",\"grant option\",\"mysql\",\"remote\",\"remote mysql\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/\",\"name\":\"How to grant MySQL remote access: in Linux and Windows - Copahost\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg\",\"datePublished\":\"2016-05-02T18:40:13+00:00\",\"dateModified\":\"2020-05-31T14:22:13+00:00\",\"description\":\"How to allow MySQL remote connections. Grant MySQL remote access. Applies both for Linux and Windows. Specify IP or Hosts to allow incomming connections.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#primaryimage\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg\",\"width\":823,\"height\":429},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.copahost.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to grant MySQL remote access: in Linux and Windows\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"name\":\"Copahost\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.copahost.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\",\"name\":\"Copahost\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"width\":223,\"height\":40,\"caption\":\"Copahost\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246\",\"name\":\"Gustavo Gallas\",\"description\":\"Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development\u200b. Also have brewing skills.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/gustavo-gallas-107926196\/\"],\"url\":\"https:\/\/www.copahost.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to grant MySQL remote access: in Linux and Windows - Copahost","description":"How to allow MySQL remote connections. Grant MySQL remote access. Applies both for Linux and Windows. Specify IP or Hosts to allow incomming connections.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/","og_locale":"en_US","og_type":"article","og_title":"How to grant MySQL remote access: in Linux and Windows - Copahost","og_description":"How to allow MySQL remote connections. Grant MySQL remote access. Applies both for Linux and Windows. Specify IP or Hosts to allow incomming connections.","og_url":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/","og_site_name":"Copahost","article_published_time":"2016-05-02T18:40:13+00:00","article_modified_time":"2020-05-31T14:22:13+00:00","og_image":[{"width":823,"height":429,"url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg","type":"image\/jpeg"}],"author":"Gustavo Gallas","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Gustavo Gallas","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#article","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/"},"author":{"name":"Gustavo Gallas","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246"},"headline":"How to grant MySQL remote access: in Linux and Windows","datePublished":"2016-05-02T18:40:13+00:00","dateModified":"2020-05-31T14:22:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/"},"wordCount":740,"commentCount":0,"publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg","keywords":["external mysql","flush privileges","grant","grant option","mysql","remote","remote mysql"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/","url":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/","name":"How to grant MySQL remote access: in Linux and Windows - Copahost","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#primaryimage"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg","datePublished":"2016-05-02T18:40:13+00:00","dateModified":"2020-05-31T14:22:13+00:00","description":"How to allow MySQL remote connections. Grant MySQL remote access. Applies both for Linux and Windows. Specify IP or Hosts to allow incomming connections.","breadcrumb":{"@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#primaryimage","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/05\/allow-remote-mysql-connections.jpg","width":823,"height":429},{"@type":"BreadcrumbList","@id":"https:\/\/www.copahost.com\/blog\/grant-mysql-remote-access\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.copahost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to grant MySQL remote access: in Linux and Windows"}]},{"@type":"WebSite","@id":"https:\/\/www.copahost.com\/blog\/#website","url":"https:\/\/www.copahost.com\/blog\/","name":"Copahost","description":"","publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.copahost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.copahost.com\/blog\/#organization","name":"Copahost","url":"https:\/\/www.copahost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","width":223,"height":40,"caption":"Copahost"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246","name":"Gustavo Gallas","description":"Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development\u200b. Also have brewing skills.","sameAs":["https:\/\/www.linkedin.com\/in\/gustavo-gallas-107926196\/"],"url":"https:\/\/www.copahost.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":15,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":303,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions\/303"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/media\/1847"}],"wp:attachment":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}