<?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 &#8211; Arun&#8217;s blog</title>
	<atom:link href="https://arunns.net/category/databases/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://arunns.net</link>
	<description>Arun&#039;s blog</description>
	<lastBuildDate>Sun, 22 Oct 2023 18:09:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.2</generator>
	<item>
		<title>Drupal 7 issue with SQL Mode TRADITIONAL</title>
		<link>https://arunns.net/drupal-7-issue-with-sql-mode-traditional/</link>
					<comments>https://arunns.net/drupal-7-issue-with-sql-mode-traditional/#comments</comments>
		
		<dc:creator><![CDATA[Arun N.]]></dc:creator>
		<pubDate>Sun, 22 May 2011 06:43:57 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[1231 Variable 'sql_mode' can't be set to the value of 'TRADITIONAL']]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Drupal 7 issue]]></category>
		<category><![CDATA[Sql Mode]]></category>
		<guid isPermaLink="false">http://arunnsblog.com/?p=478</guid>

					<description><![CDATA[PDOException: SQLSTATE[42000]: Syntax error or access violation: 1231 Variable &#8216;sql_mode&#8217; can&#8217;t be set to the value of &#8216;TRADITIONAL&#8217; in lock_may_be_available() (line 165 of /includes/lock.inc). This was the case when I installed Drupal 7 with Cpanel/Fantastico, the drupal site was displaying the above error. This issue is discussed at drupal issues . try to patch it [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>PDOException: SQLSTATE[42000]: Syntax error or access violation: 1231  Variable &#8216;sql_mode&#8217; can&#8217;t be set to the value of &#8216;TRADITIONAL&#8217; in  lock_may_be_available() (line 165 of /includes/lock.inc).</strong></p>
<p>This was the case when I installed Drupal 7 with Cpanel/Fantastico, the drupal site was displaying the above error.</p>
<p>This issue is discussed at <a href="http://drupal.org/node/344575" target="_blank" rel="noopener">drupal issues</a> . try to patch it as mentioned in the url.</p>
<p>But for me it works with the following change, just removed the TRADITIONAL mode, not  sure it is the correct way to fix it. You can verify the sql modes at <a href="http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html" target="_blank" rel="noopener">http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html</a> ,  Anyway now there is no errors in drupal site and I am able to login.</p>
<p><em>(includes/database/mysql/database.inc) Line: 65</em></p>
<p><em> New file</em><br />
<em> &lt;      $this-&gt;exec(&#8220;SET sql_mode=&#8217;ANSI,ONLY_FULL_GROUP_BY'&#8221;);</em><br />
<em> &#8212;</em><br />
<em> Old file</em><br />
<em> &gt;      $this-&gt;exec(&#8220;SET sql_mode=&#8217;ANSI,TRADITIONAL'&#8221;);</em></p>
<p>Also setting up the sql connection mode to <em><code>SET SESSION sql_mode = "ANSI,TRADITIONAL";</code> </em>is an option instead of above change.</p>
<p>./arun</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong><br />
</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://arunns.net/drupal-7-issue-with-sql-mode-traditional/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Mysql backup script</title>
		<link>https://arunns.net/mysql-backup-script/</link>
					<comments>https://arunns.net/mysql-backup-script/#respond</comments>
		
		<dc:creator><![CDATA[Arun N.]]></dc:creator>
		<pubDate>Tue, 05 Jan 2010 12:22:28 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Shell script]]></category>
		<category><![CDATA[compressed mysql backup]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[mysql backup]]></category>
		<category><![CDATA[mysql backup script]]></category>
		<category><![CDATA[mysql dump]]></category>
		<guid isPermaLink="false">http://arunnsblog.com/?p=146</guid>

					<description><![CDATA[Ensuring data integrity and security is paramount. Regular backups play a crucial role in safeguarding your MySQL databases against unforeseen disasters]]></description>
										<content:encoded><![CDATA[
<p>Ensuring data integrity and security is paramount. Regular backups play a crucial role in safeguarding your MySQL databases against unforeseen disasters</p>



<pre class="wp-block-code has-small-font-size"><code>#!/bin/bash


# Variables
DATE="$(date +"%d-%m-%Y")"
TIME="$(date +"%d-%m-%Y-%H%M")"
USER=username
PASSWORD=password
DATABASE=dbname

# Create backup directory with today's date
/bin/mkdir -p /backup/Mysql/$DATE

# Perform MySQL dump to the backup directory
/usr/bin/mysqldump -l -F -u $USER --password=$PASSWORD $DATABASE > /backup/Mysql/$DATE/backup_$TIME.sql

# Compress backup files
/usr/bin/bzip2 /backup/Mysql/*/*.sql

# Remove files older than x days (e.g., 90 days)
for i in `/usr/bin/find /backup/Mysql/ -maxdepth 1 -type d -mtime +90 -print`; do
    /bin/echo -e "Deleting old directories $i"
    /bin/rm -rf $i
done
</code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://arunns.net/mysql-backup-script/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
