Database Schema Size

Query the size of each of the schemas defined on the database server:

SELECT table_schema "Data Base Name", SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;

Select the size of each of the tables defined in a schema:

SELECT TABLE_NAME, table_rows, data_length, index_length, round(((data_length + index_length) / 1024 / 1024),2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "schema_name";

encrypting files using openssl

encrypt file.txt to file.enc using 256-bit AES in CBC mode

openssl enc -aes-256-cbc -salt -in file.txt -out file.enc

the same, only the output is base64 encoded for, e.g., e-mail

openssl enc -aes-256-cbc -a -salt -in file.txt -out file.enc

decrypt binary file.enc

openssl enc -d -aes-256-cbc -in file.enc

decrypt base64-encoded version

openssl enc -d -aes-256-cbc -a -in file.enc


thanks Mark, http://bolusmjak.posterous.com/

5 lines every sshd config should contain

to begin to properly secure your linux computer with ssh your sshd configuration file should contain the lines below.  These lines prevent root access, force public key authentication (no password to crack) and restrict access to named users only.

PermitRootLogin no
PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
AllowUsers babyman evan