How can I import a database with mysql from terminal?
I cannot find the exact syntax.
The simplest way to import a database in your MYSQL from the terminal is done by the below-mentioned process -
mysql -u root -p root database_name < path to your .sql file
What I'm doing above is:
root & root)< and then path to your .sql file. For example, if my file is stored in Desktop, the path will be /home/Desktop/db.sqlThat's it. Once you've done all this, press enter and wait for your .sql file to get uploaded to the respective database