blog image

Here we will discuss about commands that are related to the sql server .

1.command to connect to the mysql server 

mysql -u databse_user_name -p -h host_ip_address -P host_port_number database_name

#example
mysql -u root -p -h localhost -P 3306 school_db

 

2.command to  take  database backup (it will create backup .sql file)

mysqldump -u database_username -p original_database_which_you_want_to_backup > database_backup_name.sql

#example
mysqldump -u root -p school_db > school_db_backup.sql

 

3.command to import database

mysql -u user_name -p database_name < database_name_you_want_to_import.sql

#example
create database school_db;
mysql -u root -p school_db < dummy.sql

 


About author

author image

Amrit Panta

Python developer, content writer



3 Comments

Amanda Martines 5 days ago

Exercitation photo booth stumptown tote bag Banksy, elit small batch freegan sed. Craft beer elit seitan exercitation, photo booth et 8-bit kale chips proident chillwave deep v laborum. Aliquip veniam delectus, Marfa eiusmod Pinterest in do umami readymade swag. Selfies iPhone Kickstarter, drinking vinegar jean.

Reply

Baltej Singh 5 days ago

Drinking vinegar stumptown yr pop-up artisan sunt. Deep v cliche lomo biodiesel Neutra selfies. Shorts fixie consequat flexitarian four loko tempor duis single-origin coffee. Banksy, elit small.

Reply

Marie Johnson 5 days ago

Kickstarter seitan retro. Drinking vinegar stumptown yr pop-up artisan sunt. Deep v cliche lomo biodiesel Neutra selfies. Shorts fixie consequat flexitarian four loko tempor duis single-origin coffee. Banksy, elit small.

Reply

Leave a Reply

Scroll to Top