<?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>David Dietrich&#039;s Business Technology Blog &#187; MySQL</title>
	<atom:link href="http://www.daviddietrich.com/topics/linux/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.daviddietrich.com</link>
	<description>Business Technology Tips</description>
	<lastBuildDate>Fri, 20 Aug 2010 23:36:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Auto commit for MySQL databases</title>
		<link>http://www.daviddietrich.com/2009/07/02/auto-commit-for-mysql-databases/</link>
		<comments>http://www.daviddietrich.com/2009/07/02/auto-commit-for-mysql-databases/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 22:08:06 +0000</pubDate>
		<dc:creator>David Dietrich</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Administration]]></category>

		<guid isPermaLink="false">http://www.daviddietrich.com/?p=154</guid>
		<description><![CDATA[In corporate database systems, it is generally preferred to build transaction stacks. This allows for having multiple database statements run and be finally committed if everything is ok. In MySQL, auto commit is on by default; which means that every statement is instantly committed. To check the value of auto commit, run the following MySQL [...]]]></description>
			<content:encoded><![CDATA[<p>In corporate database systems, it is generally preferred to build transaction stacks. This allows for having multiple database statements run and be finally committed if everything is ok. In MySQL, auto commit is on by default; which means that every statement is instantly committed. To check the value of auto commit, run the following MySQL command:</p>
<p><strong>mysql&gt;select @@autocommit;</strong></p>
<p>So in order to turn off auto commit, run the following command in MySQL:</p>
<p><strong>mysql&gt;SET autocommit=0</strong></p>
<p>If you want auto commit turned off permanently, we need to edit your my.cnf file. In the [mysqld], add the following line:</p>
<pre><strong>init_connect='SET autocommit=0'</strong></pre>
<p>Restart MySQL and you are now ready to do full transaction processing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.daviddietrich.com/2009/07/02/auto-commit-for-mysql-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access to MySQL</title>
		<link>http://www.daviddietrich.com/2009/02/11/access-to-mysql/</link>
		<comments>http://www.daviddietrich.com/2009/02/11/access-to-mysql/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 23:48:37 +0000</pubDate>
		<dc:creator>David Dietrich</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.daviddietrich.com/?p=62</guid>
		<description><![CDATA[To gain access to MySQL run the following command: mysql -u root -p mysql You will be prompted for the root password. mysqladmin command to change root password If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password [...]]]></description>
			<content:encoded><![CDATA[<p>To gain access to MySQL run the following command:</p>
<p><strong>mysql -u root -p mysql</strong></p>
<p>You will be prompted for the root password.</p>
<h2>mysqladmin command to change root password</h2>
<p>If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:</p>
<pre>$ mysqladmin -u root password NEWPASSWORD</pre>
<p>However, if you want to change (or update) a root password, then you need to use following command</p>
<pre>$ mysqladmin -u root -p oldpassword newpass</pre>
<p>Enter password:</p>
<h2>Change MySQL password for other user</h2>
<p>To change a normal user password you need to type (let us assume you would like to change password for vivek):</p>
<pre>$ mysqladmin -u vivek -p oldpassword newpass</pre>
<h2>Changing MySQL root user password using mysql sql command</h2>
<p>This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek:</p>
<p>1) Login to mysql server, type following command at shell prompt:</p>
<pre>$ mysql -u root -p</pre>
<p>2) Use mysql database (type command at mysql&gt; prompt):</p>
<pre>mysql&gt; use mysql;</pre>
<p>3) Change password for user vivek:</p>
<pre>mysql&gt; update user set password=PASSWORD("NEWPASSWORD") where User='vivek';</pre>
<p>4) Reload privileges:</p>
<pre>mysql&gt; flush privileges;
mysql&gt; quit</pre>
<p>This method you need to use while using PHP or Perl scripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.daviddietrich.com/2009/02/11/access-to-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
