Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Cyber Security
  3. Question
Cyber Security

How to import sql file to mysql?

Asked by Amit Raj Sep 29, 2022 1.0K views 1 answer
Share

About this question

I am trying to import a .sql file using MySQL Workbench and I get this error: ERROR 1046 (3D000) at line 28: No database selected

I have first created an empty database called with the same name as the .sql file but it doesn't work. I have also tried to do it with the mysql command client using:


mysqldump -u root database > file.sql 

But it says there is an error in my SQL syntax. Furthermore, I don't know the path where I have to set the file.sql.

Your answer

1 Answer

More Cyber Security discussions