Install free HTTPS SSL on wordpress with ubuntu
Install free HTTPS SSL on wordpress with ubuntu
Office 365 PowerShell Commands
Show all

MYSQL Queries

MYSQL Queries

Backup Database

mysqldump -u root -p DBname > /var/tmp/

and check backup file size: cd /var/tmp

Backup Database from remote RDS

mysqldump -P 3306 -h remoteserverdnsname -u dbuser -p DBname > /var/tmp/

Connect to mysql server

mysql -h localhost -P 3306 -u root -p 

Show Database

mysql>show databases;

Create Database

mysqladmin -u root -p create tempdb

Import Database

sudo mysql -h localhost -u root -p --max_allowed_packet=1073741824 DBname < /var/tmp/restoreDB.sql

Delete Database


Delete Table

select database: use dbname;

DROP TABLE table_name ;

Export Table

mysql localhost  -u root -p dbname tableName  > /var/tmp/table-name.sql

Import Table

mysql -h localhost -P 3306 -u root -p -D dbname < /var/tmp/table-name.sql

Backup Database command with password
mysqldump --user=root --password=password dbname > dbname.sql

Leave a Reply

Your email address will not be published. Required fields are marked *