connecting to amazon aws linux server by ssh on mac

You’ll want to put the keypair in {your home directory}/.ssh . If that folder doesn’t exist, create it. Once you put the keypair in there you have to change the permissions on the file so only your user can read it. Launch the terminal and type

chmod 600 ~/.ssh/

That limits access to the file, and then to limit access to the folder type

chmod 700 ~/.ssh

You have to limit the access because the OpenSSH protocol won’t let you use a key that other’s can view.

Then to log into your instance, from the terminal you would enter

ssh -i /.ssh/ ec2-user@


Mysql: How to get size of mysql database?

Run this query and you’ll probably get what you’re looking for:

SELECT table_schema                                        "DB Name", 
   Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" 
FROM   information_schema.tables 
GROUP  BY table_schema;