Twitter is a free service that lets you keep in touch with people through the exchange of quick, frequent answers to one simple question: What's happening? Join today to start receiving shantanuo's tweets.
Already using Twitter from your phone? Click here.
shantanuo
One can use TIMEDIFF() & DATEDIFF(), or compare two UNIX_TIMESTAMP() values. My personal favorite is to use TIMESTAMPDIFF()10:02 PM Dec 11thfrom web
strings -n2 user.MYD # to see the usernames, hosts, and password hashes7:26 AM Oct 29thfrom web
create procedure tst (myvar int) begin if (myvar > 0) then select 'greater than'; else select 'less than'; end if; end$$ #mysql procedure3:20 AM Oct 26thfrom web
update mysql.proc set security_type = 'INVOKER' ; # this will allow anyone to execute others stored procedures3:07 AM Oct 26thfrom web
(echo "delimiter ;;" && mysqldump -uroot -pPassWord -d --routines dbName | awk '/(SP1|New_SP2)/,/;;/') | more9:34 PM Oct 25thfrom web
Every developer should use error_reporting(E_ALL); while developing.7:16 AM Oct 9thfrom web
PHP can be used in an interactive mode php -a and ctrl+d to execute6:39 AM Oct 9thfrom web
You can add ‘!/usr/bin/php’ header at the top of the PHP script and marke it as executable6:37 AM Oct 9thfrom web
but only for the number of times specified in master-retry-count. #mysql9:33 AM Oct 8thfrom web
#MySQL slave will try to reconnect after getting a timeout (slave-net-timeout) after waiting the number of seconds in master-connect-retry9:32 AM Oct 8thfrom web
ssh user@host "mysqldump -h localhost -u root -pPassWord databasename | gzip -cf" | gunzip -c > database.sql # backup from remote #mysql8:44 AM Oct 8thfrom web