Archive

Archive for February, 2011

Setting TimeZone Linux Ubuntu

February 24th, 2011
cd /usr/share/zoneinfo

#remove the current localtime sym link (if its wrong, if it were correct, you would not be looking for this blog)
sudo rm localtime

#Create the new symlink to the new timezone I am in the NYC timezone...so
sudo ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

Greg Uncategorized

Linux Kill All Processes By Name

February 11th, 2011

Had a server with a bunch of hanging perl processes, and wanted to kill them all in one shot.

Solution:

kill -9 `pgrep perl`

Greg How-To, Linux, Perl ,

MYSQL Import -–Force Not working when importing a mysqldump

February 9th, 2011

This was a frustrating problem, because I had a a view and a routine in my dump that were using a function that had not been created by the dump as of yet. The –force command was not working for me…..

The Solution:

mysql -f -t -vvv -h localhost -u root -p < importfile.sql

Dump and Import one Liner (put all on one line)

mysqldump -h remote.host.com -u username  -pPassword --lock-tables=false 
--routines=true MyDatabase | mysql -f -t -vvv -h localhost -u username2 –pPassword2 
--force MyDatabase

Greg MySQL, SQL Server Stuff