|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Run sql script
I have one file call test.sql its contents are something like this
Create table test { id int unsigned not null primary key, name char(10) not null }; then i want to run it in MySQL command line and add this file into my database (its name : books) but i really don't know where to put this file in??? I installed MySQL at C:\mysql So anyone can tell me where i should put test.sql in to run I had tried it by: mysql -uusername -ppassword databasename < test.sql and got ERROR 1064. I thought my problem was the position of the test.sql file so i tried to put it somewhere in c:\mysql but i still got nothing???? |
|
#2
|
|||
|
|||
|
any luck on this?
I have run into the exact same problem. mysql> source a.sql error mysql> source c:\a.sql error mysql> \. a.sql error mysql> \. c:\a.sql error $ mysql -u root <a.sql error $ mysql -u root < C:\a.sql Nothing works. Is there something else I need to set up? |
|
#3
|
|||
|
|||
|
Try inserting that line to your command line client first, you might notice there's a problem in your syntax.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Run sql script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|