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 a have an error in my SQL syntax. Furthermore, I don't know the path where I have to set the file.sql.