Restoring a Backup: How to import a MySQL Database through the command line interface

MySQL Database (Db) is a fully-managed database service that runs on a Local Server and on the Web, and it is ideal for both small and large applications and it uses the standard SQL language. MySQL is free to download and use and has the most comprehensive set of advanced features, management tools, and technical support to achieve the highest levels of MySQL scalability, security, reliability, and uptime. The data in a MySQL database are stored in tables. See the following guide on MySQL, how to reset Mysql Root password, how to access MySQL Server from command Prompt, how to create and delete MySQL database, and how to migrate Veeam MsSQL Database to a new MsSQL Server.

root@Plxxrx:~# mysql -u root -p -h localhost cxxp_cxxtao < /var/www/pplxxx.ixxx/mysqlnewdump.sql


#mysql -u database_user_name -p my_db < /home/username/my_db_backup.sql

More info: Here it should be almost the same as the export.
#mysql -u database_user_name -p my_db < /home/kudda/my_db_backup.sql. Here it is the same as export. after u- you put your database user name and the -p is used for the pasword option still. Here is one example of it.

Example: mysql -u root -p my_db < /home/usename/my_db_backup.sql

I welcome you to follow me on YouTube Channel. I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x