<?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>database | /var/logs/paulooi.log</title>
	<atom:link href="https://logs.paulooi.com/tag/database/feed" rel="self" type="application/rss+xml" />
	<link>https://logs.paulooi.com</link>
	<description>Systems Admin, Web Development and etc</description>
	<lastBuildDate>Wed, 06 Jul 2011 12:38:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>How to Change MySQL Data Directory in Linux Centos</title>
		<link>https://logs.paulooi.com/how-to-change-mysql-data-directory-in-linux-centos.php</link>
					<comments>https://logs.paulooi.com/how-to-change-mysql-data-directory-in-linux-centos.php#respond</comments>
		
		<dc:creator><![CDATA[Paul Ooi]]></dc:creator>
		<pubDate>Sat, 02 Jul 2011 06:04:37 +0000</pubDate>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[datadir]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mycnf]]></category>
		<category><![CDATA[mysql]]></category>
		<guid isPermaLink="false">http://systems.takizo.com/?p=1413</guid>

					<description><![CDATA[<p>By default Linux CentOS or other Linux Distro installation, MySQL data directory is stored in /var/db/mysql, how can I change it to other directory in example /db/mysql? It is always better to have MySQL Data Directory store in a specific...</p>
The post <a href="https://logs.paulooi.com/how-to-change-mysql-data-directory-in-linux-centos.php">How to Change MySQL Data Directory in Linux Centos</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></description>
										<content:encoded><![CDATA[<p><strong>By default Linux CentOS or other Linux Distro installation, MySQL data directory is stored in /var/db/mysql, how can I change it to other directory in example /db/mysql? </strong></p>
<p>It is always better to have MySQL Data Directory store in a specific partition/drive. It will help on performance and better management and scalability. You change change the data store directory in Linux by editing /etc/my.cnf file.</p>
<p>Edit /etc/my.cnf file</p>
<pre>
<code>
# vi /etc/my.cnf
</code>
</pre>
<p>Change the data directory structure</p>
<pre>
<code>
datadir=/db/mysql
socket=/db/mysql/mysql.sock
</code>
</pre>
<p>After the file has been updated, restart MySQL service.</p>The post <a href="https://logs.paulooi.com/how-to-change-mysql-data-directory-in-linux-centos.php">How to Change MySQL Data Directory in Linux Centos</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></content:encoded>
					
					<wfw:commentRss>https://logs.paulooi.com/how-to-change-mysql-data-directory-in-linux-centos.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PostgreSQL Database psql Command Line Query</title>
		<link>https://logs.paulooi.com/postgresql-database-psql-command-line-query.php</link>
					<comments>https://logs.paulooi.com/postgresql-database-psql-command-line-query.php#comments</comments>
		
		<dc:creator><![CDATA[Paul Ooi]]></dc:creator>
		<pubDate>Sun, 11 Jul 2010 19:34:31 +0000</pubDate>
				<category><![CDATA[Systems]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[pgsql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[psql]]></category>
		<category><![CDATA[query]]></category>
		<guid isPermaLink="false">http://systems.takizo.com/?p=1024</guid>

					<description><![CDATA[<p>Sometime psql command line query can be useful when it comes to Bash script processing. There are data stored in PostgreSQL database and I would like to write a bash script to massage the data into report. Example below show...</p>
The post <a href="https://logs.paulooi.com/postgresql-database-psql-command-line-query.php">PostgreSQL Database psql Command Line Query</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></description>
										<content:encoded><![CDATA[<p>Sometime psql command line query can be useful when it comes to Bash script processing. There are data stored in PostgreSQL database and I would like to write a bash script to massage the data into report. Example below show query to PostgreSQL database by using the psql command.</p>
<pre>
<code>
/usr/local/bin/psql -c "SELECT email_address FROM members WHERE active is TRUE;" -U someuser -t -A -o member-email-address.txt accounting
</code>
</pre>
<p>psql is connecting to accounting database, query from members table and out the result into a txt file name member-email-address.txt. </p>
<p>-t &#8211; Return result only, do not result with table name.<br />
-A &#8211; By default, returned result will have white space, this is to remove the white space.<br />
-o &#8211; Output the result into a file. </p>The post <a href="https://logs.paulooi.com/postgresql-database-psql-command-line-query.php">PostgreSQL Database psql Command Line Query</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></content:encoded>
					
					<wfw:commentRss>https://logs.paulooi.com/postgresql-database-psql-command-line-query.php/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Create Root Privilege User on MySQL</title>
		<link>https://logs.paulooi.com/create-root-privilege-user-on-mysql.php</link>
					<comments>https://logs.paulooi.com/create-root-privilege-user-on-mysql.php#respond</comments>
		
		<dc:creator><![CDATA[Paul Ooi]]></dc:creator>
		<pubDate>Tue, 11 May 2010 02:57:56 +0000</pubDate>
				<category><![CDATA[Systems]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[privileges]]></category>
		<category><![CDATA[user]]></category>
		<guid isPermaLink="false">http://systems.takizo.com/?p=966</guid>

					<description><![CDATA[<p>By default, MySQL root privileges user is &#8220;root&#8221;, I always remove &#8220;root&#8221; userid once I got MySQL installed, mainly for security purpose, secondly I do not want stupid thing happened like someone able to brute force into MySQL database. You...</p>
The post <a href="https://logs.paulooi.com/create-root-privilege-user-on-mysql.php">Create Root Privilege User on MySQL</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></description>
										<content:encoded><![CDATA[<p>By default, MySQL root privileges user is &#8220;root&#8221;, I always remove &#8220;root&#8221; userid once I got MySQL installed, mainly for security purpose, secondly I do not want stupid thing happened like someone able to brute force into MySQL database. </p>
<p>You can create &#8220;root&#8221; alike privilege user in MySQL by following the step below;</p>
<ul>
<li>Access to mysql /usr/local/bin/mysql</li>
<li>mysql> GRANT ALL PRIVILEGES ON *.* TO &#8216;yourusername&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;yourpasswordhere&#8217; WITH GRANT OPTION;</li>
<li>mysql> flush privileges;</li>
<li>mysql> quit;</li>
</ul>
<p>You can add a few more privileges user if you have more than 1 person to admin MySQL Database. </p>The post <a href="https://logs.paulooi.com/create-root-privilege-user-on-mysql.php">Create Root Privilege User on MySQL</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></content:encoded>
					
					<wfw:commentRss>https://logs.paulooi.com/create-root-privilege-user-on-mysql.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Reset MySQL Root Password</title>
		<link>https://logs.paulooi.com/reset-mysql-root-password.php</link>
					<comments>https://logs.paulooi.com/reset-mysql-root-password.php#respond</comments>
		
		<dc:creator><![CDATA[Paul Ooi]]></dc:creator>
		<pubDate>Mon, 10 May 2010 08:55:11 +0000</pubDate>
				<category><![CDATA[Systems]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[root]]></category>
		<guid isPermaLink="false">http://systems.takizo.com/?p=964</guid>

					<description><![CDATA[<p>Very often, once we didn&#8217;t log on to MySQL database for some time, I guess most of us will forgot the root password. Can we reset the root password? Obviously&#8230; Nothing is Impossible 😛 Follow the steps below to reset...</p>
The post <a href="https://logs.paulooi.com/reset-mysql-root-password.php">Reset MySQL Root Password</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></description>
										<content:encoded><![CDATA[<p>Very often, once we didn&#8217;t log on to MySQL database for some time, I guess most of us will forgot the root password. Can we reset the root password? Obviously&#8230; Nothing is Impossible <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f61b.png" alt="😛" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
<p>Follow the steps below to reset MySQL&#8217;s Root Password;</p>
<ul>
<li>Stop MySQL Service</li>
<li>Start MySQL Service in Safe Mode: /usr/local/bin/mysqld_safe –skip-grant-tables&#038;</li>
<li>Connect to MySQL /usr/local/bin/mysql</li>
<li>mysql> use mysql;</li>
<li>mysql> UPDATE user set password=password(&#8216;newpassword’) where user=’root’ and host=’localhost’;</li>
<li>mysql> flush privileges;</li>
<li>mysql> quit;</li>
<li>Stop MySQL Service Again</li>
<li>Start MySQL Service in normal mode</li>
</ul>
<p>Log in to MySQL with your newly created password. </p>The post <a href="https://logs.paulooi.com/reset-mysql-root-password.php">Reset MySQL Root Password</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></content:encoded>
					
					<wfw:commentRss>https://logs.paulooi.com/reset-mysql-root-password.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
