{"id":263,"date":"2026-06-17T06:57:01","date_gmt":"2026-06-17T06:57:01","guid":{"rendered":"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/"},"modified":"2026-10-07T14:37:13","modified_gmt":"2026-10-07T12:37:13","password":"","slug":"cum-se-configureaza-o-conexiune-mysql-remote","status":"publish","type":"docs","link":"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/","title":{"rendered":"Cum configurez o conexiune MySQL remote?"},"content":{"rendered":"<p>Po\u021bi accesa bazele de date MySQL de la distan\u021b\u0103 \u00een dou\u0103 moduri: printr-un <strong>tunel SSH<\/strong> (cel mai sigur, traficul e criptat) sau printr-o <strong>conexiune direct\u0103<\/strong> (mai simpl\u0103 dar mai pu\u021bin sigur\u0103).<\/p>\n<h3>Metoda 1: tunel SSH<\/h3>\n<p><strong>Windows (PuTTY):<\/strong><\/p>\n<ol>\n<li>Porne\u0219te PuTTY. La <strong>Connection \u2192 SSH \u2192 Tunnels<\/strong>, seteaz\u0103 <strong>Source port<\/strong> = <code>3306<\/code> (dac\u0103 rulezi local un MySQL, folose\u0219te alt port local, ex. 3307).<\/li>\n<li>La <strong>Destination<\/strong> tasteaz\u0103 <code>localhost:3306<\/code>, selecteaz\u0103 <em>Local<\/em> \u0219i <em>Auto<\/em>, apoi <strong>Add<\/strong>.<\/li>\n<li>La <strong>Session<\/strong>, completeaz\u0103 <strong>Host Name<\/strong> (domeniul\/IP-ul t\u0103u) \u0219i <strong>Port<\/strong> = <code>5334<\/code> (portul SSH HostX), tip <em>SSH<\/em>.<\/li>\n<li>Apas\u0103 <strong>Open<\/strong>, accept\u0103 cheia serverului \u0219i autentific\u0103-te cu utilizatorul \u0219i parola de cPanel.<\/li>\n<\/ol>\n<p>C\u00e2t timp sesiunea SSH este deschis\u0103, conecteaz\u0103 aplica\u021bia MySQL local\u0103 la <code>localhost:3306<\/code>.<\/p>\n<p><strong>macOS \/ Linux:<\/strong><\/p>\n<pre><code>ssh -p 5334 -L 3306:localhost:3306 username@domeniul-tau.tld<\/code><\/pre>\n<p>(Primul <code>3306<\/code> = portul local; <code>localhost:3306<\/code> = MySQL pe server; <code>5334<\/code> = portul SSH.) Dup\u0103 autentificare, folose\u0219te aplica\u021bia MySQL local\u0103 conectat\u0103 la <code>localhost:3306<\/code>.<\/p>\n<h3>Metoda 2: conexiune direct\u0103 (Remote MySQL)<\/h3>\n<ol>\n<li>\u00cen cPanel \u2192 <strong>Databases \u2192 Remote MySQL<\/strong>.<\/li>\n<li>La <strong>Host<\/strong>, adaug\u0103 IP-ul de la care te conectezi (\u00eel afli acces\u00e2nd un serviciu de tip \u201ewhat is my IP&#8221;) \u0219i apas\u0103 <strong>Add Host<\/strong>.<\/li>\n<li>Conecteaz\u0103-te apoi cu o aplica\u021bie client MySQL. Pentru a elimina un host, folose\u0219te <strong>X<\/strong> l\u00e2ng\u0103 el \u00een lista <em>Access Hosts<\/em>.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Po\u021bi accesa bazele de date MySQL de la distan\u021b\u0103 \u00een dou\u0103 moduri: printr-un tunel SSH (cel mai sigur, traficul e criptat) sau printr-o conexiune direct\u0103 (mai simpl\u0103 dar mai pu\u021bin sigur\u0103). Metoda 1: tunel SSH Windows (PuTTY): Porne\u0219te PuTTY. La Connection \u2192 SSH \u2192 Tunnels, seteaz\u0103 Source port = 3306 (dac\u0103 rulezi local un MySQL, &#8230; <a title=\"Cum configurez o conexiune MySQL remote?\" class=\"read-more\" href=\"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/\" aria-label=\"Cite\u0219te mai multe despre Cum configurez o conexiune MySQL remote?\">Cite\u0219te mai mult<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"whmcs_kb_id":691,"footnotes":""},"doc_category":[35],"doc_tag":[234,231,227,232,235,485,245,240],"class_list":["post-263","docs","type-docs","status-publish","hentry","doc_category-mysql","doc_tag-administrare","doc_tag-baza-de-date","doc_tag-configurare","doc_tag-cpanel","doc_tag-mysql","doc_tag-putty","doc_tag-securitate","doc_tag-ssh"],"year_month":"2026-11","word_count":201,"total_views":"1","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Adrian Firican","author_nicename":"techeditor1","author_url":"https:\/\/www.hostx.ro\/kb\/author\/techeditor1\/"},"doc_category_info":[{"term_name":"MySQL","term_url":"https:\/\/www.hostx.ro\/kb\/docs-category\/mysql\/"}],"doc_tag_info":[{"term_name":"administrare","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/administrare\/"},{"term_name":"baz\u0103 de date","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/baza-de-date\/"},{"term_name":"configurare","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/configurare\/"},{"term_name":"cPanel","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/cpanel\/"},{"term_name":"MySQL","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/mysql\/"},{"term_name":"PuTTY","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/putty\/"},{"term_name":"securitate","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/securitate\/"},{"term_name":"SSH","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/ssh\/"}],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Conexiune MySQL remote: tunel SSH \u0219i cPanel - Centrul de suport HostX<\/title>\n<meta name=\"description\" content=\"Configura\u021bi conexiuni MySQL remote prin tunel SSH criptat (PuTTY, Linux\/macOS) sau conexiune direct\u0103 \u00een cPanel, pentru acces sigur la baze de date.\" \/>\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.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/\" \/>\n<meta property=\"og:locale\" content=\"ro_RO\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Conexiune MySQL remote: tunel SSH \u0219i cPanel - Centrul de suport HostX\" \/>\n<meta property=\"og:description\" content=\"Configura\u021bi conexiuni MySQL remote prin tunel SSH criptat (PuTTY, Linux\/macOS) sau conexiune direct\u0103 \u00een cPanel, pentru acces sigur la baze de date.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/\" \/>\n<meta property=\"og:site_name\" content=\"Centrul de suport HostX\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-07T12:37:13+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Timp estimat pentru citire\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-configureaza-o-conexiune-mysql-remote\\\/\",\"url\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-configureaza-o-conexiune-mysql-remote\\\/\",\"name\":\"Conexiune MySQL remote: tunel SSH \u0219i cPanel - Centrul de suport HostX\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/#website\"},\"datePublished\":\"2026-06-17T06:57:01+00:00\",\"dateModified\":\"2026-10-07T12:37:13+00:00\",\"description\":\"Configura\u021bi conexiuni MySQL remote prin tunel SSH criptat (PuTTY, Linux\\\/macOS) sau conexiune direct\u0103 \u00een cPanel, pentru acces sigur la baze de date.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-configureaza-o-conexiune-mysql-remote\\\/#breadcrumb\"},\"inLanguage\":\"ro-RO\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-configureaza-o-conexiune-mysql-remote\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-configureaza-o-conexiune-mysql-remote\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prima pagin\u0103\",\"item\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"InfoCentru\",\"item\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cum configurez o conexiune MySQL remote?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/\",\"name\":\"Centrul de suport HostX\",\"description\":\"tutoriale gazduire web, domenii web \u0219i servere\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ro-RO\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Conexiune MySQL remote: tunel SSH \u0219i cPanel - Centrul de suport HostX","description":"Configura\u021bi conexiuni MySQL remote prin tunel SSH criptat (PuTTY, Linux\/macOS) sau conexiune direct\u0103 \u00een cPanel, pentru acces sigur la baze de date.","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.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/","og_locale":"ro_RO","og_type":"article","og_title":"Conexiune MySQL remote: tunel SSH \u0219i cPanel - Centrul de suport HostX","og_description":"Configura\u021bi conexiuni MySQL remote prin tunel SSH criptat (PuTTY, Linux\/macOS) sau conexiune direct\u0103 \u00een cPanel, pentru acces sigur la baze de date.","og_url":"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/","og_site_name":"Centrul de suport HostX","article_modified_time":"2026-10-07T12:37:13+00:00","twitter_card":"summary_large_image","twitter_misc":{"Timp estimat pentru citire":"2 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/","url":"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/","name":"Conexiune MySQL remote: tunel SSH \u0219i cPanel - Centrul de suport HostX","isPartOf":{"@id":"https:\/\/www.hostx.ro\/kb\/#website"},"datePublished":"2026-06-17T06:57:01+00:00","dateModified":"2026-10-07T12:37:13+00:00","description":"Configura\u021bi conexiuni MySQL remote prin tunel SSH criptat (PuTTY, Linux\/macOS) sau conexiune direct\u0103 \u00een cPanel, pentru acces sigur la baze de date.","breadcrumb":{"@id":"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/#breadcrumb"},"inLanguage":"ro-RO","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hostx.ro\/kb\/cum-se-configureaza-o-conexiune-mysql-remote\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Prima pagin\u0103","item":"https:\/\/www.hostx.ro\/kb\/"},{"@type":"ListItem","position":2,"name":"InfoCentru","item":"https:\/\/www.hostx.ro\/kb\/docs\/"},{"@type":"ListItem","position":3,"name":"Cum configurez o conexiune MySQL remote?"}]},{"@type":"WebSite","@id":"https:\/\/www.hostx.ro\/kb\/#website","url":"https:\/\/www.hostx.ro\/kb\/","name":"Centrul de suport HostX","description":"tutoriale gazduire web, domenii web \u0219i servere","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hostx.ro\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ro-RO"}]}},"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/comments?post=263"}],"version-history":[{"count":4,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/263\/revisions"}],"predecessor-version":[{"id":7309,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/263\/revisions\/7309"}],"wp:attachment":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/media?parent=263"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/doc_category?post=263"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/doc_tag?post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}