MySQL Commands

To login (from unix shell) use -h only if needed. # [mysql dir]/bin/mysql -h hostname -u root -p Create a database on the sql server. mysql> create database [databasename]; List all databases on the sql server. mysql> show databases; Switch to a database. mysql> use [db name]; To see all …

rsync and mysqldump mysql for wordpress

rsync -auvz –rsh=”ssh -p 22 user@example.com:/var/www/www.example.it/www /vagrant/www/wordpress-website mysqldump –add-drop-table –lock-tables=false  -h localhost -u user -p databasename | gzip > website.bak.sql.gz mysql -u root -p -h localhost wordpress_fmcinema < data.sql