How do I run a SQL file in Linux terminal?

How do I run a SQL file in Linux terminal?
Answer
Please follow below steps.
  1. Open Terminal and type mysql -u to Open the MySQL command line.
  2. Type the path of your mysql bin directory and press Enter.
  3. Paste your SQL file inside the bin folder of mysql server.
  4. Create a database in MySQL.
  5. Use that particular database where you want to import the SQL file.
 

Tìm kiếm

Back
Top