<?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>0xDEADBEEF &#187; MySQL</title>
	<atom:link href="http://deadbeef.psychotomy.net/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://deadbeef.psychotomy.net</link>
	<description>Geek Chic?  Or just Geek!</description>
	<lastBuildDate>Sat, 30 Mar 2013 04:06:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>MySQL SSL (1 of 3)</title>
		<link>http://deadbeef.psychotomy.net/2010/01/mysql-ssl-1-of/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-ssl-1-of</link>
		<comments>http://deadbeef.psychotomy.net/2010/01/mysql-ssl-1-of/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 02:44:52 +0000</pubDate>
		<dc:creator>attriel</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://deadbeef.psychotomy.net/?p=140</guid>
		<description><![CDATA[First thing to note:  The community build of MySQL does not support SSL.  You either need the Enterprise or you need to build it yourself. To check if SSL is enabled on your build: log into MySQL via any account mysql&#62; show variables like 'have_ssl'; +---------------+-------+ &#124; Variable_name &#124; Value &#124; +---------------+-------+ &#124; have_ssl      &#124; [...]]]></description>
				<content:encoded><![CDATA[<p>First thing to note:  The community build of MySQL does not support SSL.  You either need the Enterprise or you need to build it yourself.</p>
<p>To check if SSL is enabled on your build:<br />
log into MySQL via any account</p>
<pre>mysql&gt; show variables like 'have_ssl';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_ssl      | YES   |
+---------------+-------+
1 row in set (0.01 sec)</pre>
<p>If it says YES, then MySQL is compiled with SSL support, otherwise a new binary will need to be generated.</p>
<p>Once MySQL has SSL, then you can set the configuration options in the MySQL Configuration/INI file as such (with path&#8217;s obviously modified):</p>
<pre>
[mysqld]
ssl-ca=/usr/mysql-5.0.84/ssl/ca-cert.pem
ssl-cert=/usr/mysql-5.0.84/ssl/mysql.cert
ssl-key=/usr/mysql-5.0.84/ssl/mysql.key
ssl-cipher=ALL
</pre>
<p>(The last line enables all SSL cipher modes except NULL encryption)</p>
<p>This assumes you have the CA Public Certificate saved as ca-cert.pem, and Public/Private key-certificate pair for your mysql server.  That will be another post</p>
<p>To test the functionality, log in to MySQL using an administrator account</p>
<pre>
mysql&gt; create database test;
mysql&gt; grant all privileges on test.* to test@localhost identified by 'testpassword' require ssl;
</pre>
<p>Then you can attempt to log in to the server as the test user:</p>
<pre>mysql -u test -p --ssl-ca=ssl/cacert.pem --ssl-cipher=ALL</pre>
<p>Without the ssl-cipher line, you get an SSL connection error because it does not know how to encrypt the connection that both parties can communicate; the CA certificate is required to activate the SSL connection and to validate the server, AFAICT.</p>
<p>You don&#8217;t technically need to use &#8220;ALL&#8221; for the cipher entries.  There are a number of choices that you can select, but for the purposes of demonstration, ALL was the simplest.</p>
<p>Part 2 will cover more detailed user restrictions.  This setup effectively only require that the connection get SSL encryption (confidentiality), but does not validate the user (authenticity).  </p>
<p>Part 3 will implement replication over SSL.</p>
]]></content:encoded>
			<wfw:commentRss>http://deadbeef.psychotomy.net/2010/01/mysql-ssl-1-of/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
