<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Can't connect | SDT 攻城獅區</title>
	<atom:link href="https://sdt.hameba.tw/tag/cant-connect/feed/" rel="self" type="application/rss+xml" />
	<link>https://sdt.hameba.tw</link>
	<description>由Steven, Der, Ted 三位高級打字員所組成，是三位工程師(攻城獅)所維護的技術分享平台，或許偶爾會分享一些日常，有任何問題或是錯誤的部分，歡迎留言告訴我們！</description>
	<lastBuildDate>Thu, 27 Feb 2020 16:31:59 +0800</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3</generator>

<image>
	<url>https://sdt.hameba.tw/wp-content/uploads/2020/02/hameba_favicon-150x150.png</url>
	<title>Can't connect | SDT 攻城獅區</title>
	<link>https://sdt.hameba.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>MariaDB 外部連線失敗 Can&#8217;t connect to MySQL server</title>
		<link>https://sdt.hameba.tw/520/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mariadb-%25e5%25a4%2596%25e9%2583%25a8%25e9%2580%25a3%25e7%25b7%259a%25e5%25a4%25b1%25e6%2595%2597-cant-connect-to-mysql-server</link>
				<comments>https://sdt.hameba.tw/520/#respond</comments>
				<pubDate>Tue, 18 Feb 2020 16:44:27 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Can't connect]]></category>
		<category><![CDATA[Maria]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=520</guid>
				<description><![CDATA[<p>使用Ubuntu安裝完mysql，其實是mariadb， 而當要從外部連線進來時會發現出現錯誤： Can&#8 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/520/" class="more-link">閱讀全文<span class="screen-reader-text">〈MariaDB 外部連線失敗 Can&#8217;t connect to MySQL server〉</span></a></p>
The post <a href="https://sdt.hameba.tw/520/">MariaDB 外部連線失敗 Can’t connect to MySQL server</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>使用Ubuntu安裝完mysql，其實是mariadb，</p>
<p>而當要從外部連線進來時會發現出現錯誤：</p>
<p><span id="more-520"></span></p>
<p>Can&#8217;t connect to MySQL server on (61)</p>
<p>所以可以透過以下幾個步驟來解決</p>
<p>Step 1.</p>
<p>查看帳號權限</p><pre class="crayon-plain-tag">$ mysql -u root -p
&gt; USE mysql;
&gt; SELECT User, Host FROM mysql.user;</pre><p>Host 需要出現%才代表可以外部連進來</p>
<p>Step 2.</p><pre class="crayon-plain-tag">$ netstat -tulpen</pre><p>查看是否有3306 port被使用，有的話代表mariaDB正常</p>
<p>Step 3.</p>
<p>以上都有的話，就是設定沒有設定好，路徑 ex:/etc/mysql/my.cnf</p><pre class="crayon-plain-tag">// mysql 方式
bind-address = 0.0.0.0

// mariaDB 方式
[mysqld]
bind-address = 0.0.0.0</pre><p>&nbsp;</p>
<p>Reference</p>
<p><a href="https://mariadb.com/kb/en/configuring-mariadb-for-remote-client-access/" target="_blank" rel="noopener noreferrer">https://mariadb.com/kb/en/configuring-mariadb-for-remote-client-access/</a></p>
<p><a href="https://zhuanlan.zhihu.com/p/38419137" target="_blank" rel="noopener noreferrer">https://zhuanlan.zhihu.com/p/38419137</a></p>The post <a href="https://sdt.hameba.tw/520/">MariaDB 外部連線失敗 Can’t connect to MySQL server</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/520/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
