To import a MySQL database directly from the command line, you can use the mysql command with the appropriate options. The import process may take a few moments to complete, depending on the size of the database.
Source code viewer
mysql -u root -p database_name < database.sqlProgramming Language: Bash