Senin, 04 Oktober 2010

Import .SQL file into Database

Yesterday, my friend ask me to upgrade his knowledgetree system. The software system that manage document. But i was a bit forgetten. So in order not to forget anymore, I'll write it :
When I want to import an SQL file such as tutorial.sql, First I create new database with type a line of this command:


mysql> CREATE DATABASE ADHIZ;

Then, I go to my sql file directory. C:/My Documents/tutorial.sql
To import this database, I write a following command:


mysql -u adhizpradana -p adhiz < tutorial.sql
Enter password:

(mysql -u username -p databasename < file.sql)

Then, the tutorial.sql will generate into the adhiz database.That's all

Tidak ada komentar: