How do I import database through command line?



How do I import database through command line?..

Answer / Nandeshwar Dubey

To import a MySQL database from a .sql file, you can use the `mysql` command-line tool. Here's an example:

```
mysql -u username -p database_name < path/to/your/sqlfile.sql
```

Replace `username`, `database_name`, and `path/to/your/sqlfile.sql` with your actual credentials and the location of your .sql file.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What are mysql functions?

1 Answers  


What is datatype in mysql?

1 Answers  


How do I start mysql in linux?

1 Answers  


How do I change directories in mysql?

1 Answers  


What are the difference between and myisam and innodb?

1 Answers  


How can you increase the performance of mysql select query?

1 Answers  


I have a table like this tblData (month int,Qty int) and i am inserting three rows in this table 1.tblData Values (1,100) 2.tblData Values (2,200) 3.tblData Values (3,300) The Result I want is the Running total of the field Qty that is 1 100 100 2 200 300 3 300 600 What is the Query for that ?

4 Answers  


What is schema in mysql?

1 Answers  


How MySQL Optimizes DISTINCT?

1 Answers  


What is the maximum number of columns per table?

1 Answers  


How can you find out the version of the installed mysql?

2 Answers  


What is pdo :: fetch_assoc?

1 Answers  


Categories