Jump to content

[SOLVED] Insert info with cmd(dos command line)


Recommended Posts

Greeting, I hope I posted this in the right sub forum


As many other I gained a insterest in Php+Mysql but however I have had alot of trouble.

For the first I got Xp home edition so In order to be able to run php and mysql on my computer Im useing the Tool Sokkit 3.5.


Right basicly I wish to add info do a database by writing mydb.dump file and "merge it" with database.


What I have done is to start cmd then write C:\Sokkit\mysql\bin\mysqladmin -u root create mydb


Witch goes well and the database has been created.


My next step is to make a text file named mydb.dump containing this info;


"  CREATE TABLE employees (  id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT,  first varchar(20),  last varchar(20),  address varchar(255),  position varchar(50),  PRIMARY KEY (id),  UNIQUE id (id));INSERT INTO employees VALUES (1,'Bob','Smith','128 Here St, Cityname','Marketing Manager');


INSERT INTO employees VALUES (2,'John','Roberts','45 There St , Townville','Telephonist');


INSERT INTO employees VALUES (3,'Brad','Johnson','1/34 Nowhere Blvd, Snowston','Doorman'); "


The file is saved in mysql/bin folder named mydb.dump


My next step is to enter cmd again and execute this command;


C:\Sokkit\mysql\bin\mysql -u root mydb < mydb.dump


But apperently nothing happend, I recive the error message File not found :/


Any help will be accepted humbly




Link to comment
Share on other sites

Thanks for the reply


Did as you asked and upload the result as a picture.


Ah and another thing is that I deleted mydb.dump file and made a new one named mydp.dump just to test if it was somthing about the name



[attachment deleted by admin]

Link to comment
Share on other sites

It was the comment you made about the notepad icon that made me wonder if the file had a hidden .txt extention.  Windows by default hides file extentions of known file types because ".txt" is far too technical for common users and will drive them insane and eventually they will buy a Macintosh.

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.