Categories

Buy Ipad at a Cheap price

Latest Book

Learn Shell Scripting

Apache cookbook

Effective awk Programming

Definitive Centos Guide

The Linux bible 2011

Linux Interview Questions

Linux Sys Admin Questions

INFORMATION SECURITY SPECIALIST

JAVA / J2EE Interview Questions

Mysql

fix for ERROR 1 (HY000): Can’t create/write to file ‘/tmp/#sql_df5_1.MYI’ (Errcode: 13)

var AdBrite_Title_Color = ’0000FF’; var AdBrite_Text_Color = ’000000′; var AdBrite_Background_Color = ‘FFFFFF’; var AdBrite_Border_Color = ‘CCCCCC’; var AdBrite_URL_Color = ’008000′; try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==”?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe=”;var AdBrite_Referrer=”;} document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(‘ src=”http://ads.adbrite.com/mb/text_group.php?sid=2153438&zs=3732385f3930&ifr=’+AdBrite_Iframe+’&ref=’+AdBrite_Referrer+’” type=”text/javascript”>’);document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));

Recently, I came accros this error while trying to export some data into a file  using a select query into /tmp. I would like to explain the fix that worked for me.

chown root:root /tmp
chmod 1777 /tmp
/etc/init.d/mysqld restart

Hope this help you guys
Post Reads: 7

var AdBrite_Title_Color = ’0000FF’;
var AdBrite_Text_Color = ’000000′;
var AdBrite_Background_Color = ‘FFFFFF’;
var AdBrite_Border_Color = ‘CCCCCC’;
var AdBrite_URL_Color = ’008000′;
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==”?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe=”;var AdBrite_Referrer=”;}

document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(‘ src=”http://ads.adbrite.com/mb/text_group.php?sid=2153438&zs=3732385f3930&ifr=’+AdBrite_Iframe+’&ref=’+AdBrite_Referrer+’” type=”text/javascript”>’);document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));

Mysql

mysql server errors, SQLSTATE: HY000,list of all mysql server errors

var AdBrite_Title_Color = ’0000FF’; var AdBrite_Text_Color = ’000000′; var AdBrite_Background_Color = ‘FFFFFF’; var AdBrite_Border_Color = ‘CCCCCC’; var AdBrite_URL_Color = ’008000′; try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==”?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe=”;var AdBrite_Referrer=”;} document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(‘ src=”http://ads.adbrite.com/mb/text_group.php?sid=2153438&zs=3732385f3930&ifr=’+AdBrite_Iframe+’&ref=’+AdBrite_Referrer+’” type=”text/javascript”>’);document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62)); Error Code SQL State Message Error: 1000 SQLSTATE: HY000 ER_HASHCHK Message: hashchk Error: 1001 SQLSTATE: HY000 ER_NISAMCHK Message: isamchk Error: 1002 SQLSTATE: HY000 ER_NO Message: NO [...]

Mysql

dump mysql excluding table, exclude a mysql table, database backup mysql, mysqldump table exclude,ignore table mysql,–ignore-table

var AdBrite_Title_Color = ’0000FF’; var AdBrite_Text_Color = ’000000′; var AdBrite_Background_Color = ‘FFFFFF’; var AdBrite_Border_Color = ‘CCCCCC’; var AdBrite_URL_Color = ’008000′; try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==”?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe=”;var AdBrite_Referrer=”;} document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(‘ src=”http://ads.adbrite.com/mb/text_group.php?sid=2153438&zs=3732385f3930&ifr=’+AdBrite_Iframe+’&ref=’+AdBrite_Referrer+’” type=”text/javascript”>’);document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));

Dump mysql database excluding a table, here ‘ignoretable’  is the table that I wish to ignore.

mysqldump -u $user -p$pass –ignore-table=$database.$ignoretable $database > $backup

Post Reads: 9

var AdBrite_Title_Color = ’0000FF’;
var AdBrite_Text_Color = ’000000′;
var AdBrite_Background_Color = ‘FFFFFF’;
var AdBrite_Border_Color = ‘CCCCCC’;
var AdBrite_URL_Color = ’008000′;
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==”?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe=”;var AdBrite_Referrer=”;}

document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(‘ src=”http://ads.adbrite.com/mb/text_group.php?sid=2153438&zs=3732385f3930&ifr=’+AdBrite_Iframe+’&ref=’+AdBrite_Referrer+’” type=”text/javascript”>’);document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));

Mysql

enabling ssl on mysql, ssl enable on mysql servers

var AdBrite_Title_Color = ’0000FF’; var AdBrite_Text_Color = ’000000′; var AdBrite_Background_Color = ‘FFFFFF’; var AdBrite_Border_Color = ‘CCCCCC’; var AdBrite_URL_Color = ’008000′; try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==”?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe=”;var AdBrite_Referrer=”;} document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(‘ src=”http://ads.adbrite.com/mb/text_group.php?sid=2153438&zs=3732385f3930&ifr=’+AdBrite_Iframe+’&ref=’+AdBrite_Referrer+’” type=”text/javascript”>’);document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));

This is pretty simple to do.

mkdir /etc/mysql/ssl

cd /etc/mysql/ssl/

rm -rf *

openssl genrsa 2048 > ca-key.pem

openssl req -new -x509 -nodes -days 1000 -key [...]

Mysql

Repair a mysql table, repair a corrupt mysql table,myisamchk,Checking tables with mysqlcheck

var AdBrite_Title_Color = ’0000FF’; var AdBrite_Text_Color = ’000000′; var AdBrite_Background_Color = ‘FFFFFF’; var AdBrite_Border_Color = ‘CCCCCC’; var AdBrite_URL_Color = ’008000′; try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==”?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe=”;var AdBrite_Referrer=”;} document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(‘ src=”http://ads.adbrite.com/mb/text_group.php?sid=2153438&zs=3732385f3930&ifr=’+AdBrite_Iframe+’&ref=’+AdBrite_Referrer+’” type=”text/javascript”>’);document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));

You can also use wildcard to check all the .MYI tables at the same time, for example:

% myisamchk *.MYI

Note that myisamchk only works with [...]