{"id":1293,"date":"2016-01-13T14:11:36","date_gmt":"2016-01-13T17:11:36","guid":{"rendered":"http:\/\/www.franklinjr.com\/blog\/?p=1293"},"modified":"2016-01-13T14:11:36","modified_gmt":"2016-01-13T17:11:36","slug":"cant-connect-to-mysql-server-on-localhost-10048","status":"publish","type":"post","link":"https:\/\/www.franklinjr.com\/blog\/index.php\/2016\/01\/13\/cant-connect-to-mysql-server-on-localhost-10048\/","title":{"rendered":"Can&#8217;t connect to MySQL server on &#8216;localhost&#8217; (10048)."},"content":{"rendered":"<p>No windows esse erro acontece porque j\u00e1 existem muitas conex\u00f5es abertas, ent\u00e3o o range default de portas que ele usa, que \u00e9 entre 1024 a 5000, j\u00e1 est\u00e3o sendo utilizadas, ent\u00e3o o erro acontece.<\/p>\n<p>Para solucionar, \u00e9 poss\u00edvel aumentar esse range, para que haja mais conex\u00f5es, para isso adicione uma chave do registro em<\/p>\n<p><strong>HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\<\/strong><\/p>\n<p>com o nome de\u00a0<strong>MaxUserPort<\/strong> com valor\u00a0<strong>65534<\/strong> e tipo <strong>DWORD<\/strong>, assim o novo limite\u00a0para utiliza\u00e7\u00e3o das portas ser\u00e3o de\u00a01024 a\u00a065534 portas, se alterar o limite para 10000, ser\u00e1 de 1024 a 10000.<\/p>\n<p>OBS: \u00e9 necess\u00e1rio reiniciar o servidor para que a configura\u00e7\u00e3o tenha efeito.<br \/>\nOBS 2: testei a configura\u00e7\u00e3o em um servidor Windows 2003 e funcionou.<\/p>\n<p>Baseado nos links abaixo:<br \/>\n<a href=\"https:\/\/support.microsoft.com\/en-us\/kb\/956188\" target=\"_blank\">https:\/\/support.microsoft.com\/en-us\/kb\/956188<\/a><br \/>\n<a href=\"https:\/\/support.microsoft.com\/en-us\/kb\/196271\" target=\"_blank\">https:\/\/support.microsoft.com\/en-us\/kb\/196271<\/a><br \/>\n<a href=\"http:\/\/serverfault.com\/questions\/98505\/cant-connect-to-mysql-server-on-localhost-10048\" target=\"_blank\">http:\/\/serverfault.com\/questions\/98505\/cant-connect-to-mysql-server-on-localhost-10048<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>No windows esse erro acontece porque j\u00e1 existem muitas conex\u00f5es abertas, ent\u00e3o o range default de portas que ele usa, que \u00e9 entre 1024 a 5000, j\u00e1 est\u00e3o sendo utilizadas, ent\u00e3o o erro acontece. Para solucionar, \u00e9 poss\u00edvel aumentar esse range, para que haja mais conex\u00f5es, para isso adicione uma chave do registro em HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\ [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[425,51],"tags":[583,584,582],"class_list":["post-1293","post","type-post","status-publish","format-standard","hentry","category-iis","category-windows","tag-iis6","tag-win2k3","tag-windows2003"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Can&#039;t connect to MySQL server on &#039;localhost&#039; (10048). - Franklin Jr.<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.franklinjr.com\/blog\/index.php\/2016\/01\/13\/cant-connect-to-mysql-server-on-localhost-10048\/\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/index.php\\\/2016\\\/01\\\/13\\\/cant-connect-to-mysql-server-on-localhost-10048\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Can&#8217;t connect to MySQL server on &#8216;localhost&#8217; (10048).\"}]}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Can't connect to MySQL server on 'localhost' (10048). - Franklin Jr.","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.franklinjr.com\/blog\/index.php\/2016\/01\/13\/cant-connect-to-mysql-server-on-localhost-10048\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/www.franklinjr.com\/blog\/index.php\/2016\/01\/13\/cant-connect-to-mysql-server-on-localhost-10048\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.franklinjr.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Can&#8217;t connect to MySQL server on &#8216;localhost&#8217; (10048)."}]}]}},"_links":{"self":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1293"}],"version-history":[{"count":2,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1293\/revisions"}],"predecessor-version":[{"id":1296,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1293\/revisions\/1296"}],"wp:attachment":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}