Importing sql files using command line

For importing multiple SQL files at one time, use this:
#Unix-based solution
for i in *.sql;do mysql -u root -pPassword DataBase < $i;done
For simple importing:
#Unix Based solution
mysql -u root -pPassword DataBase < data.sql
WAMP
#mysqlVersion replace with your own version
C:\wamp\bin\mysql\mysqlVersion\bin\mysql.exe -u root -pPassword DataBase < data.sql
XAMPP
C:\xampp\mysql\bin\mysql -u root -pPassword DataBase < data.sql

Comments

Popular posts from this blog

The Superstar Of Hell

অ্যাডাম টিজিং

PHP তে HTML Escape করা