How do I create a new database and import .SQL file?

Open Terminal & Login.

If you don’t have a password, leave it off like I did.

mysql -u root {PRESS ENTER}
mysql> create database iamchristinabot; {PRESS ENTER}
Query OK, 1 row affected (0.00 sec)

Now I’ve got a spot to drop in a new database, exit out of mySQL and back to your command prompt.

mysql -u root iamchristinabot < Downloads/iamchristinabot.sql

MYSQL LOGIN DATABASENAME < LOCATION/OF/DATABASE.sql If nothing happens after that, you did it right! That’s it!

Back to Blog

Say Hello

You can reach me by email, I'd love to hear from you.