I have a sql schema dump from phpmyadmin. I want to create a new database from that schema on a new machine. I have tried this:
mysql -uuser -ppwd < schema.sql
It says no database is selected. I know that I could CREATE database first then import, but is there an easier way to do this? I plan to do it in a script.
You can even embed
CREATE DATABASEstatement in your SQL.