Command Hacks

To access mysql by command line

mysql -u <username> -p

To copy an entire folder from one place to another

cp -a <folder> <destination_folder>

To login into postgresql by command line , postgres is the default user.

sudo -u postgres psql

The create a new user

sudo -u postgres createuser -P -s -e <name_of_new_user>

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s