<?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>MySQL Preacher</title>
	<atom:link href="http://mysqlpreacher.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysqlpreacher.com/wordpress</link>
	<description>A MySQL blog, from a MySQL DBA</description>
	<lastBuildDate>Mon, 08 Feb 2010 17:44:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Automating MySQL access with expect and bash scripting</title>
		<link>http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 17:08:26 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[expect]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=327</guid>
		<description><![CDATA[If you have multiple database servers with strange names, or if you have to hop over multiple machines to connect to any mysql database server, then you know what a pain it can be to administer such a setup. Thanks to some scripting, you can automate such tasks as follows:
Create an expect script:
/path/to/sshmysql.exp
#!/usr/bin/expect -f
#script by [...]]]></description>
			<content:encoded><![CDATA[<p>If you have multiple database servers with strange names, or if you have to hop over multiple machines to connect to any mysql database server, then you know what a pain it can be to administer such a setup. Thanks to some scripting, you can automate such tasks as follows:</p>
<p>Create an expect script:<br />
/path/to/sshmysql.exp</p>
<blockquote><p>#!/usr/bin/expect -f<br />
#script by darren cassar<br />
#mysqlpreacher.com</p>
<p>set machine  [lindex $argv 0]</p>
<p>set timeout -1</p>
<p>spawn ssh username@$machine<br />
match_max 100000<br />
expect -exact &#8220;assword: &#8221;<br />
send &#8212; &#8220;password\r&#8221;<br />
send &#8212; &#8220;sudo -k; sudo su &#8211; mysql\r&#8221;<br />
expect -exact &#8220;sudo -k; sudo su &#8211; mysql&#8221;<br />
expect -exact &#8220;assword:&#8221;<br />
send &#8212; &#8220;password\r&#8221;<br />
interact</p></blockquote>
<p># you should change the word password in &#8217;send &#8212; &#8220;password\r&#8221;&#8216; to your login password<br />
# if you have the same password for each environment you could also script logging into mysql directly from the same expect script BUT that is not recommended.</p>
<p>Create a bash script:<br />
/path/to/login.sh</p>
<blockquote><p>#!/bin/bash<br />
#script by darren cassar<br />
#mysqlpreacher.com</p>
<p>sm=&#8217;/path/to/sshmysql.exp&#8217;</p>
<p>menu() {<br />
  echo &#8221; 101 &#8211; dev.databaseserver1 &#8221;<br />
  echo &#8221; 102 &#8211; dev.databaseserver2 &#8221;<br />
  echo &#8221; 103 &#8211; dev.databaseserver3 &#8221;<br />
  echo &#8221; 201 &#8211; qa.databaseserver1 &#8221;<br />
  echo &#8221; 301 &#8211; uat.databaseserver1 &#8221;<br />
  echo &#8221; 302 &#8211; uat.databaseserver2 &#8221;<br />
  echo &#8221; 401 &#8211; prod.databaseserver1 &#8221;<br />
  echo &#8221; &#8221;<br />
}</p>
<p>ARGUMENT=notmenu</p>
<p>if [ -z "$1" ]<br />
  then<br />
    ARGUMENT=menu<br />
else<br />
  choice=$1<br />
fi</p>
<p>if [ $ARGUMENT = "menu" ]<br />
  then<br />
    menu<br />
else<br />
  case &#8220;$choice&#8221; in<br />
  101|dev.databaseserver1   ) $sm dev.databaseserver1;;<br />
  102|dev.databaseserver2   ) $sm dev.databaseserver2;;<br />
  103|dev.databaseserver3   ) $sm dev.databaseserver3;;<br />
  201|qa.databaseserver1   ) $sm qa.databaseserver1;;<br />
  301|uat.databaseserver1   ) $sm uat.databaseserver1;;<br />
  302|uat.databaseserver2   ) $sm uat.databaseserver2;;<br />
  401|prod.databaseserver1   ) $sm prod.databaseserver1;;<br />
  *        ) echo &#8220;Wrong value passed to script&#8221;<br />
             menu ;;<br />
  esac<br />
fi</p></blockquote>
<blockquote><p>alias l=&#8217;/path/to/login.sh&#8217;</p></blockquote>
<p>Output: </p>
<blockquote><p>[darrencassar@mymachine ~ ]$ l<br />
 101 &#8211; dev.databaseserver1<br />
 102 &#8211; dev.databaseserver2<br />
 103 &#8211; dev.databaseserver3<br />
 201 &#8211; qa.databaseserver1<br />
 301 &#8211; uat.databaseserver1<br />
 302 &#8211; uat.databaseserver2<br />
 401 &#8211; prod.databaseserver1</p></blockquote>
<p>Output:<br />
The below command would log you into the first development database server as mysql user.</p>
<blockquote><p>[darrencassar@mymachine ~ ]$ l 101 </p></blockquote>
<p>On each machine place aliases for each instance in the .profile</p>
<blockquote><p>alias use3306=&#8217;mysql -u root -p -h 127.0.0.1 -P 3306 &#8211;prompt=&#8221;mysql \D> &#8220;&#8216;</p></blockquote>
<p>The above setup can be used using any client/server OS: Linux, Solaris, MAC OS or Windows(running Cygwin)</p>
<p><strong>NOTE: If you store the password in clear text inside the expect script, you should at least save the scripts inside an encrypted partition on your machine and make sure that folder is not shared or accessible by anyone. Another way of doing it would be to use either SSHKeys OR save the password inside a file and encrypt it using <a href="http://www.madboa.com/geek/openssl/#encrypt-simple" target="_blank">OpenSSL</a></strong></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2010/02/automating-mysql-access-with-expect-and-bash-scripting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Make Mac Finder sort folders on top</title>
		<link>http://mysqlpreacher.com/wordpress/2009/12/make-mac-finder-sort-folders-on-top/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/12/make-mac-finder-sort-folders-on-top/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 10:28:41 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Finder]]></category>
		<category><![CDATA[folders]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=322</guid>
		<description><![CDATA[Once every so often something bugs me enough to look up and here is today&#8217;s bugger! Sorting files and folders in Mac&#8217;s Finder by type, folders first!
In essence:
1. Select Finder, click on Go from the menu bar and select Go to Folder
2. From the dialog box that opens, type:
/System/Library/CoreServices/
and press Return
3. Locate Finder application, right [...]]]></description>
			<content:encoded><![CDATA[<p>Once every so often something bugs me enough to look up and here is today&#8217;s bugger! Sorting files and folders in Mac&#8217;s Finder by type, folders first!</p>
<p>In essence:<br />
1. Select Finder, click on Go from the menu bar and select Go to Folder<br />
2. From the dialog box that opens, type:<br />
/System/Library/CoreServices/<br />
and press Return<br />
3. Locate Finder application, right click on it, and select Show Package Contents<br />
4. Navigate to Contents>Resources>English.lproj and open InfoPlist.strings in a text editor<br />
5. Navigate to the line which says<br />
&#8220;Folder&#8221; = &#8220;Folder&#8221;;<br />
at around line 7 of the file, and simply add an empty space or a symbol (such as &#8220;.&#8221; or &#8220;~&#8221;) in front of the second &#8220;Folder&#8221;.<br />
6. Save the text file, type in the Administrator password when asked, and close the text file.<br />
7. The final step would be to restart finder, which you can achieve by holding in the ALT or OPTION key and right clicking on the Finder icon in Dock, then selecting Relaunch.</p>
<p>Full detailed tutorial can be found <a href="http://forum.notebookreview.com/showthread.php?t=208068">here</a>: thanks to &#8220;Budding&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/12/make-mac-finder-sort-folders-on-top/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL &#8211; IP vs DNS</title>
		<link>http://mysqlpreacher.com/wordpress/2009/12/mysql-ip-vs-dns/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/12/mysql-ip-vs-dns/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 15:39:12 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[grants]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[skip-name-resolve]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=315</guid>
		<description><![CDATA[A MySQL is running happily on a machine situated in a land far far away. I grant access to a user@machine_aaaaaa (grant select on db.* to &#8216;user&#8217;@'machine_aaaaa&#8217; identified by &#8216;password&#8217;; flush privileges;), send an email to the user saying it should run fine and happily go off my way. Mistake!
It seems this user can&#8217;t connect [...]]]></description>
			<content:encoded><![CDATA[<p>A MySQL is running happily on a machine situated in a land far far away. I grant access to a user@machine_aaaaaa (grant select on db.* to &#8216;user&#8217;@'machine_aaaaa&#8217; identified by &#8216;password&#8217;; flush privileges;), send an email to the user saying it should run fine and happily go off my way. Mistake!</p>
<p>It seems this user can&#8217;t connect to the mysql gets access denied:<br />
Access denied for user &#8216;user&#8217;@'machine_bbbbb&#8217; (using password: YES)</p>
<p>Note that the machine the user is being seen from is totally different from the one I set up in the grant!! WHY?</p>
<p>run a reverse lookup on the ip of machine_aaaaa, turns out it shows machine_bbbbb. So I figure a big bad guy messed up /etc/hosts, I was right! `cat /etc/hosts` just to find an entry for machine_aaaaa blehh</p>
<p>Ok, solution is to remove the entry from /etc/hosts (after finding out it wasn&#8217;t even necessary and wasn&#8217;t even supposed to be there in the first place), restart nscd.</p>
<p>Retry<br />
AGAIN &#8211; Access denied for user &#8216;user&#8217;@'machine_bbbbb&#8217; (using password: YES)</p>
<p>What the &#8230;.</p>
<p>What&#8217;s wrong now? &#8212; yeah silly me forgot to `flush hosts` :) </p>
<p>Retry<br />
YOHOO I&#8217;m in!</p>
<p>I&#8217;ve seen quite a few blogs about disabling name resolve in mysql with skip-name-resolve and granting privileges using IPs &#8211; something which would also have avoided the above (but still not found the root of the problem):</p>
<p><a href="http://jeremy.zawodny.com/blog/archives/011421.html">http://jeremy.zawodny.com/blog/archives/011421.html</a><br />
<a href="http://www.mysqlperformanceblog.com/2008/05/31/dns-achilles-heel-mysql-installation/">http://www.mysqlperformanceblog.com/2008/05/31/dns-achilles-heel-mysql-installation/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/12/mysql-ip-vs-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Call it IRONY</title>
		<link>http://mysqlpreacher.com/wordpress/2009/12/call-it-irony/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/12/call-it-irony/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 13:32:19 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql database connection failed]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=309</guid>
		<description><![CDATA[WIKIPEDIA -

Irony (from the Ancient Greek εἰρωνεία eirōneía, meaning hypocrisy, deception, or feigned ignorance) is a situation, literary technique or rhetorical device, in which there is an incongruity, discordance or unintended connection that goes beyond the most evident meaning. It is the expression of one&#8217;s meaning by using language that normally signifies the opposite.
Types of [...]]]></description>
			<content:encoded><![CDATA[<p>WIKIPEDIA -</p>
<p><img alt="" src="http://www.mysqlpreacher.com/wordpress/images/Irony.png" title="Irony" class="alignnone" width="1087" height="157" /></p>
<blockquote><p>Irony (from the Ancient Greek εἰρωνεία eirōneía, meaning hypocrisy, deception, or feigned ignorance) is a situation, literary technique or rhetorical device, in which there is an incongruity, discordance or unintended connection that goes beyond the most evident meaning. It is the expression of one&#8217;s meaning by using language that normally signifies the opposite.</p>
<p>Types of irony<br />
Modern theories of rhetoric distinguish among verbal, dramatic and situational irony.<br />
▪	Verbal irony is a disparity of expression and intention: when a speaker says one thing but means another, or when a literal meaning is contrary to its intended effect. An example of this is sarcasm.<br />
▪	Dramatic irony is a disparity of expression and awareness: when words and actions possess a significance that the listener or audience understands, but the speaker or character does not.<br />
<strong> ▪	Situational irony is the disparity of intention and result: when the result of an action is contrary to the desired or expected effect. Likewise, cosmic irony is disparity between human desires and the harsh realities of the outside world (or the whims of the gods). By some definitions, situational irony and cosmic irony are not irony at all.</strong>
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/12/call-it-irony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL vs InfoBright optimizer battle</title>
		<link>http://mysqlpreacher.com/wordpress/2009/12/mysql-vs-infobright-optimizer-battle/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/12/mysql-vs-infobright-optimizer-battle/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 17:33:36 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[infobright]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[optimiser]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=302</guid>
		<description><![CDATA[MySQL instance running an Infobright engine

mysql> explain SELECT COUNT(ac.UID) FROM ACTIVE ac JOIN ALL a;
+----+-------------+-------+------+---------------+------+---------+------+---------+-------+
&#124; id &#124; select_type &#124; table &#124; type &#124; possible_keys &#124; key  &#124; key_len &#124; ref  &#124; rows    &#124; Extra &#124;
+----+-------------+-------+------+---------------+------+---------+------+---------+-------+
&#124;  1 &#124; SIMPLE      &#124; ac    &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL instance running an Infobright engine</p>
<blockquote><p><code lang="sql"><br />
mysql> explain SELECT COUNT(ac.UID) FROM ACTIVE ac JOIN ALL a;<br />
+----+-------------+-------+------+---------------+------+---------+------+---------+-------+<br />
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows    | Extra |<br />
+----+-------------+-------+------+---------------+------+---------+------+---------+-------+<br />
|  1 | SIMPLE      | ac    | ALL  | NULL          | NULL | NULL    | NULL |  124426 |       |<br />
|  1 | SIMPLE      | a     | ALL  | NULL          | NULL | NULL    | NULL | 7594256 |       |<br />
+----+-------------+-------+------+---------------+------+---------+------+---------+-------+<br />
2 rows in set (0.01 sec)</p>
<p>mysql> SELECT COUNT(ac.UID) FROM ACTIVE ac JOIN ALL a ON ac.UID=a.UID;<br />
+---------------+<br />
| COUNT(ac.UID) |<br />
+---------------+<br />
|         17466 |<br />
+---------------+<br />
1 row in set (0.23 sec)</p>
<p>mysql> set @tot = (SELECT COUNT(ac.UID) FROM ACTIVE ac JOIN ALL a ON ac.UID=a.UID); </p>
<p>^CQuery aborted by Ctrl+C<br />
</code></p></blockquote>
<p>Took more than 60seconds &#8212;- what the &#8230;..<br />
Why did it take a long?</p>
<blockquote><p><code lang="sql"><br />
mysql> set @a=2;<br />
Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql> select @a;<br />
+------+<br />
| @a   |<br />
+------+<br />
| 2    |<br />
+------+<br />
1 row in set (0.00 sec)</p>
<p>mysql> set @tot = (SELECT COUNT(*) FROM ACTIVE);<br />
Query OK, 0 rows affected (0.13 sec)</p>
<p>mysql> select @tot;<br />
+--------+<br />
| @tot   |<br />
+--------+<br />
| 124426 |<br />
+--------+<br />
1 row in set (0.00 sec)</p>
<p>mysql> set @tot = (SELECT COUNT(ac.UID) FROM ACTIVE ac);<br />
Query OK, 0 rows affected (0.22 sec)</p>
<p>mysql> select @tot;<br />
+--------+<br />
| @tot   |<br />
+--------+<br />
| 124426 |<br />
+--------+<br />
1 row in set (0.00 sec)</p>
<p>mysql> SELECT COUNT(ac.UID) FROM ACTIVE ac, ALL a;<br />
+---------------+<br />
| COUNT(ac.UID) |<br />
+---------------+<br />
|  944922897056 |<br />
+---------------+<br />
1 row in set (0.05 sec)</p>
<p>mysql> set @tot=(SELECT COUNT(ac.UID) FROM ACTIVE ac JOIN ALL a);<br />
^CQuery aborted by Ctrl+C<br />
ERROR 1317 (70100): Query execution was interrupted<br />
</code></p></blockquote>
<p>Reason? &#8230;. the query is using the MySQL optimiser rather than the IB one! Why? good question (will have to ask IB devs though).</p>
<p>Work around, use ac temporary table to store the result and setting the variable to the result field, but it&#8217;s really ugly isn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/12/mysql-vs-infobright-optimizer-battle/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Securich goes google code &#8211; release 0.2.0</title>
		<link>http://mysqlpreacher.com/wordpress/2009/12/securich-goes-google-code-release-0-2-0/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/12/securich-goes-google-code-release-0-2-0/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 19:02:28 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=300</guid>
		<description><![CDATA[The security plugin for MySQL namely Securich has been migrated to google code a while ago for availability and usability purposes. Last week I finished testing and made available version 0.2.0 which includes some important enhancements like 
* Added reconciliation from mysql to securich during installation
The above feature enables the installation of securich on instances [...]]]></description>
			<content:encoded><![CDATA[<p>The security plugin for MySQL namely Securich has been migrated to google code a while ago for availability and usability purposes. Last week I finished testing and made available version 0.2.0 which includes some important enhancements like </p>
<p>* Added reconciliation from mysql to securich during installation</p>
<p>The above feature enables the installation of securich on instances already in operation without loosing any of the current user base and associated privileges (unlike previous versions which were mostly usable on new instances without user base).</p>
<p>* Added mysql version check for connection kill using processlist view in information_schema available as from 5.1.7</p>
<p>* Added auditing of users changing password via MySQLs own `set_password`<br />
* Added auditing of role creation and updates<br />
* Added auditing of grants / revokes</p>
<p>With auditing, the dba will be able to look at when a particular permission was granted, and by whom, which roles were updated and what kind of update, privilege added/removed as well as auditing of users trying to change passwords through MySQL rather than through Securich which would otherwise possibly make password complexity and aging futile.</p>
<p>Also some naming changes have been made in order to achieve more &#8220;MySQL&#8217;ly&#8217; like commands:</p>
<p>* Stored proc check_roles was renamed to show_roles<br />
* Stored proc check_role_privileges was renamed to show_privileges_in_roles<br />
* Stored proc check_user_privileges was renamed to show_user_privileges<br />
* Stored proc check_privilege_users was renamed to show_users_with_privilege<br />
* Stored proc check_user_list was renamed to show_user_list<br />
* Stored proc check_user_entries was renamed to show_user_entries<br />
* Stored proc check_full_user_entries was renamed to show_full_user_entrie</p>
<p>Anyone interested in enhancing the functionality of securich can also use the new test scripts implemented in order to make sure nothing was broken by code change.</p>
<p>Bug reports / feature requests can be done through google code at http://code.google.com/p/securich.</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/12/securich-goes-google-code-release-0-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL anonymous accounts &#8211; User=&#8221;, Host=&#8217;%&#8217; &#8211; CODE RED</title>
		<link>http://mysqlpreacher.com/wordpress/2009/10/mysql-anonymous-accounts-user-host-code-red/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/10/mysql-anonymous-accounts-user-host-code-red/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 13:50:30 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[%]]></category>
		<category><![CDATA[accounts]]></category>
		<category><![CDATA[anonymous]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[threat]]></category>
		<category><![CDATA[usernames]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=297</guid>
		<description><![CDATA[I want to highlight the importance of reviewing mysql&#8217;s initial set of accounts.
Say you have a mysql on abc.def.ghi.jkl running on port 3306 anonymous account with privileges without a password, then:
1. mysql (if issued on localhost)
2. mysql -h abc.def.ghi.jkl
3. mysql -u &#8221; -h abc.def.ghi.jkl
4. mysql -u &#8221; -h abc.def.ghi.jkl -P 3306
5. mysql -u user_which_does_not_exist -h [...]]]></description>
			<content:encoded><![CDATA[<p>I want to highlight the importance of reviewing mysql&#8217;s initial set of accounts.<br />
Say you have a mysql on abc.def.ghi.jkl running on port 3306 anonymous account with privileges without a password, then:<br />
1. mysql (if issued on localhost)<br />
2. mysql -h abc.def.ghi.jkl<br />
3. mysql -u &#8221; -h abc.def.ghi.jkl<br />
4. mysql -u &#8221; -h abc.def.ghi.jkl -P 3306<br />
5. mysql -u user_which_does_not_exist -h abc.def.ghi.jkl</p>
<p>will all manage to get into mysql given the way mysql authenticates users is against your username and client host from where you are connecting.</p>
<p>This verification is done versus the following columns in the mysql.user table, i.e., User,Host and Password columns.<br />
An entry in the mysql.user table with the following values User=&#8221;, Host=&#8217;%&#8217; will accept ANY user connecting from ANYWHERE in the world, thus disabling ANY security. Hence the reason for this blog post highlighting the importance of dropping such accounts, at least in all environments apart from dev.</p>
<p>Further information at:</p>
<p>http://dev.mysql.com/doc/refman/5.1/en/connection-access.html</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/10/mysql-anonymous-accounts-user-host-code-red/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL related bookmark collection</title>
		<link>http://mysqlpreacher.com/wordpress/2009/09/mysql-related-bookmark-collection/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/09/mysql-related-bookmark-collection/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 10:40:27 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[general knowledge]]></category>
		<category><![CDATA[ha]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[performance analysis]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slow queries]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=293</guid>
		<description><![CDATA[I am publishing my MySQL related bookmark collection http://www.mysqlpreacher.com/bookmarks/.
Feel free to send me links you think might be good to add in order to help others.
Remember, SHARING IS CARING!!! …. we get so much for free, why shouldn’t we give some back?
Cheers,
Darren
]]></description>
			<content:encoded><![CDATA[<p>I am publishing my MySQL related bookmark collection <strong><a href="http://www.mysqlpreacher.com/bookmarks/" target="_blank">http://www.mysqlpreacher.com/bookmarks/</a></strong>.</p>
<p>Feel free to send me links you think might be good to add in order to help others.</p>
<p>Remember, SHARING IS CARING!!! …. we get so much for free, why shouldn’t we give some back?</p>
<p>Cheers,<br />
Darren</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/09/mysql-related-bookmark-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
