Posted on March 30, 2008 by Alex
For commenting the following snippets can be used :
sudo perl -i -p -e ‘ print “#” . ” ” if !/^#/ && /^read-only/; ‘ /etc/my.cnf
sed -i -e ’s/^read-only/#&/g’ cnf
For uncommenting you can use the following snippets :
sudo perl -i -p -e ’s/^#// if /^#/ && /read-only/; ‘ /etc/my.cnf
sed -i -e ’s/^#*read-only/read-only/g’ cnf
Filed under: mysql | Tagged: commet, inline, my.cnf, perl, sed | Leave a Comment »
Posted on March 27, 2008 by Alex
Architects off site kicked of the Bangalore Architects group. The day was full of fun activities and discussions related to the career of an Architect. It was a great forum to meet lots of like minded folks. There were Architect aspirants and veterans. The whole group was split into smaller groups and the groups [...]
Filed under: yahoo | Tagged: architect | 4 Comments »
Posted on March 23, 2008 by Alex
No no not my laptop or my computer, back wheel and mud guard in my two wheeler got stuck. Tried brute force attack didn’t help, hence borrowed a spanner removed the connecting bolt and brute forced , boom it came off.
Though there was a garage, they were not willing to look into my problem since [...]
Filed under: personal | Tagged: frustration, physical | Leave a Comment »
Posted on March 22, 2008 by Alex
Generate the timezone tables using the following command :
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
This needs to be done only after the OS level timezone patch is applied. Incase you dont have the timezone info, it can be downloaded @ http://dev.mysql.com/downloads/timezones.html
To check if your timezone patching is good, run the following sql and both the [...]
Filed under: mysql | Tagged: mysql, timezone | Leave a Comment »
Posted on March 14, 2008 by Alex
Today the development team posted an interesting problem in staging. The table in question had 2 million records. There was an index on the column referred in the where clause. It was a range lookup. Now here is the problem ,
Query using index took 15 secs.
Query without the index took 3 secs.
Now given the background [...]
Filed under: mysql | Tagged: index, mysql, performance | Leave a Comment »
Comment/Uncomment all cron tab entries in one shot
Comment :
sed -i -e ‘/^[ ]*[0-9]/ s/^/#/g’ /var/spool/cron/mysql
Uncomment :
sed -i -e ‘/^#*[ ]*[0-9]/ s/^#*[ ]*//g’ /var/spool/cron/mysql
Filed under: mysql | Tagged: comment, crontab, sed | Leave a Comment »