<?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>Zelut's Blog &#187; mysql</title>
	<atom:link href="http://blog.zelut.org/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zelut.org</link>
	<description>Brain Dump of a Linux Admin</description>
	<lastBuildDate>Sat, 12 Feb 2011 16:31:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Change Root Password MySQL</title>
		<link>http://blog.zelut.org/2009/06/18/change-root-password-mysql/</link>
		<comments>http://blog.zelut.org/2009/06/18/change-root-password-mysql/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 21:05:38 +0000</pubDate>
		<dc:creator>Christer</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://blog.zelut.org/?p=154</guid>
		<description><![CDATA[I don&#8217;t know how many times I have had to look up this information in the past. In hopes of learning-through-writing I&#8217;ve decided to publish these methods of recovering or resetting the MySQL root password. Set Initial Password If you&#8217;ve just installed MySQL and have never set the root password a password is not yet [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know how many times I have had to look up this information in the past. In hopes of learning-through-writing I&#8217;ve decided to publish these methods of recovering or resetting the MySQL root password.</p>
<p><strong>Set Initial Password</strong></p>
<p>If you&#8217;ve just installed MySQL and have never set the root password a password is not yet needed. Until one is defined you should be able to access your database(s) without the password. To set a password for the first time you can use:</p>
<blockquote><p><code> mysqladmin -u root password NEWPASSWORD</code></p></blockquote>
<p><strong>Update Root Password</strong><br />
If you want to update or change the existing root password you can use:</p>
<blockquote><p><code> mysqladmin -u root -p'oldpassword' password newpass</code></p></blockquote>
<p>You should note that this will require that you know the current password.</p>
<p><strong>Recover Lost Password</strong></p>
<p>If you have completely lost the MySQL root password and need to reset it you can. This will require short downtime on your database(s). Below are the steps for:</p>
<ol>
<li>stopping the service.</li>
<li>restarting with bypassed security.</li>
<li>logging into mysql without authentication</li>
<li>inserting a SQL statement, resetting the password.</li>
<li>restarting the database.</li>
</ol>
<p>Stop the database using one of these commands (Linux vs FreeBSD installations):</p>
<blockquote><p><code>/etc/init.d/mysql stop<br />
/usr/local/etc/rc.d/mysql-server stop</code></p></blockquote>
<p>Start MySQL in safe mode, bypassing security:</p>
<blockquote><p><code>mysqld_safe --skip-grant-tables &amp;</code></p></blockquote>
<p>Login to MySQL as the root user. No authentication required:</p>
<blockquote><p><code>mysql -u root</code></p></blockquote>
<p>Provide the following SQL commands to reset the password. Change &#8220;NEWPASSWORD&#8221; to your password of choice:</p>
<blockquote><p><code>mysql&gt; use mysql;<br />
mysql&gt; update user set password=PASSWORD("NEWPASSWORD") where User='root';<br />
mysql&gt; flush privileges;<br />
mysql&gt; quit</code></p></blockquote>
<p>Restart MySQL with new authentication in place:</p>
<blockquote><p><code>/etc/init.d/mysql restart</code></p></blockquote>
<p>I hope this not only helps me remember these steps but helps others who run into the same problem. I have written about <a title="reset the mysql root password" href="http://ubuntu-tutorials.com/2008/01/08/how-to-reset-the-mysql-password-ubuntu-710/">Ubuntu specific instructions for resetting the mysql password</a>. These instructions should be global to any distribution or MySQL installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zelut.org/2009/06/18/change-root-password-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL Database Tables Read Only [SOLVED]</title>
		<link>http://blog.zelut.org/2009/06/11/mysql-database-tables-read-only-solved/</link>
		<comments>http://blog.zelut.org/2009/06/11/mysql-database-tables-read-only-solved/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 03:31:09 +0000</pubDate>
		<dc:creator>Christer</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[read-only]]></category>
		<category><![CDATA[read-write]]></category>

		<guid isPermaLink="false">http://blog.zelut.org/?p=132</guid>
		<description><![CDATA[After typing out that title I wonder if I&#8217;ve been spending too much time on forums, hehe. In any case, I ran into a problem today regarding my database tables being read-only so I thought I&#8217;d post this for the good of the internets. I had to dig pretty deep to find a solution to [...]]]></description>
			<content:encoded><![CDATA[<p>After typing out that title I wonder if I&#8217;ve been spending too much time on forums, hehe. In any case, I ran into a problem today regarding my database tables being read-only so I thought I&#8217;d post this for the good of the internets. I had to dig pretty deep to find a solution to it. Hopefully some additional Google fodder will make life a bit easier for the next guy.</p>
<p>If you&#8217;re a regular reader here you know that I had some database problems this morning with this site. I ended up needing to import some databases from backups and manually tweak a few things to restore the lost data. Well it turns out that after a database import or a change of users and permissions your database tables can become read-only. I&#8217;m not entirely sure the reasoning behind this, but I found some discussion about it on a MySQL developers mailing list thread.</p>
<p>The solution that I found was to export (read: backup) all of my MySQL databases, and magically things become read-write again. I did this through the phpmyadmin web interface:</p>
<ol>
<li>Login to /phpmyadmin/ on your site.</li>
<li> Click &#8220;Export&#8221; in the first column, near the bottom.</li>
<li>Click &#8220;Select All&#8221; atop your list of databases.</li>
<li>Select any special export options you want (optional)</li>
<li>Click &#8220;Save as file&#8221; and a compression type. Click Go.</li>
</ol>
<p>This will export and (optionally) compress your databases into an archive and present it to you as a download through your browser. Tuck it away for safe keeping somewhere and then check your database(s) again. Are they still read-only? If they are you are probably experiencing a different problem than I was, and I&#8217;m sorry this didn&#8217;t help. If they are now read-write, congratulations!</p>
<p>If anyone can shed any light on the reasoning behind this I&#8217;d be very interested to know. Until then, I&#8217;ve learned not to question the oddities like this but to simply share the method to the madness. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zelut.org/2009/06/11/mysql-database-tables-read-only-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/25 queries in 0.018 seconds using disk: basic
Object Caching 269/318 objects using disk: basic

Served from: blog.zelut.org @ 2012-02-04 20:51:37 -->
