Tuesday, April 22, 2014

Sunday, April 20, 2014

Quotes by Bernard of Clairvaux

“There are those who seek knowledge for the sake of knowledge; that is Curiosity.

There are those who seek knowledge to be known by others; that is Vanity.

There are those who seek knowledge in order to serve; that is Love.”

Sunday, April 6, 2014

Spain 2014 Vacation (March 28 - April 5)



View Larger Map


Tour company - Marfil Travel
Visited Places:
- Barcelona
- Zaragoza
- Madrid
- Toledo
- Cordoba
- Granada
- Valencia



Wednesday, March 26, 2014

Yo dawg (slang)


"Yo dawg" is a greeting - like "Hey buddy"

Tuesday, March 25, 2014

Quote of the day

JC: listen i can only lead a horse to water
ME: i cant make him drink

Friday, March 14, 2014

MySQL client useful commands

[Change Prompt]
mysql >\R Production> (Enter)
PROMPT set to 'Production> '
Production>

[Edit Query]
1. mysql > \e
2. Opens editor
3. Close editor (should see results)

[Tee]
TEST>\T  /tmp/mysql_tee.log
Logging to file '/tmp/mysql_tee.log'
(Write data into the file)

cat /tmp/mysql_tee.log
TEST>select count(*) from users;
+----------+
| count(*) |
+----------+
|      278 |
+----------+
1 row in set (0.00 sec)

[Clear]
demo;select * from incorrect query \c;
ERROR:
No query specified

[Status]
devjack@localhost) [localhost]>\s;
--------------
mysql  Ver 14.14 Distrib 5.5.32, for debian-linux-gnu (x86_64) using readline 6.2

Connection id:          23962
Current database:       devdb
Current user:           devjack@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.5.32-0ubuntu0.12.04.1 (Ubuntu)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 9 days 13 hours 36 min 20 sec

Threads: 1  Questions: 136024  Slow queries: 2  Opens: 20267  Flush tables: 1  Open tables: 400  Queries per second avg: 0.164
--------------

[Pager]
'\P less' - will output the query data using the UNIX command less
''\P cat > /tmp/sql_output.log - will send output to the file


[More Useful commands]
?         (\?) Synonym for `help'.
clear     (\c) Clear the current input statement.
connect   (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
edit      (\e) Edit command with $EDITOR.
ego       (\G) Send command to mysql server, display result vertically.
exit      (\q) Exit mysql. Same as quit.
go        (\g) Send command to mysql server.
help      (\h) Display this help.
nopager   (\n) Disable pager, print to stdout.
notee     (\t) Don't write into outfile.
pager     (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print     (\p) Print current command.
prompt    (\R) Change your mysql prompt.
quit      (\q) Quit mysql.
rehash    (\#) Rebuild completion hash.
source    (\.) Execute an SQL script file. Takes a file name as an argument.
status    (\s) Get status information from the server.
system    (\!) Execute a system shell command.
tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.