Search This Blog

Wednesday, June 15, 2011

Import database in mysql from *.sql file; execute sql file under mysql on windows; Import exported database in mysql

You can use mysql.exe from c:\wamp\bin\mysql\mysql5.5.8\bin\


C:\>mysql -h -u root -p wirtlab < c:\public\localhost.sql
Enter password: ***

wirtlab is the database name.

-p should be used WITHOUT giving the password
(as you can see mysql asks you for password after executing the command)

1 comment:

  1. Export/dump mysql 4.0 database:

    C:\mysql\bin>mysqldump.exe -u root -psys --databases epuap > dumpfile.20120719.dump


If you like this post, please leave a comment :)