0

I am trying to run MySQL files from a batch file .

I am currently using this code

mysql -u<root> -p<> -e "source C:/xampp/htdocs/internet_wk_1.7/db/master_db.sql" kani
  • root is my user name.
  • I have no password.
  • I want to run the master_db.sql, the path is correct.
  • the database name is kani, it already exists

When I run the batch file nothing happens. What am I doing wrong?

UPDATE

hi i solved it . this my new code

CLS
C:
cd\xampp\mysql\bin
mysql -u root -e "source C:\xampp\htdocs\internet_wk_1.7\db\master_db.sql" kani

but i have more than one sql file in my folder , i want run them too. i tried like this but not working , please help

CLS
C:
cd\xampp\mysql\bin
mysql -u root -e "source C:\xampp\htdocs\internet_wk_1.7\db\master_db.sql" kani
source C:\xampp\htdocs\internet_wk_1.7\db\master_db_tracker.sql
2
  • 2
    Are you really passing the <, > characters to the mysql command? If yes, remove them. Commented May 12, 2012 at 8:04
  • @ a_horse_with_no_name , hi i updated my question , please take a look Commented May 12, 2012 at 8:42

1 Answer 1

1
CLS
C:
cd\xampp\mysql\bin
mysql -u root -e "source C:\xampp\htdocs\internet_wk_1.7\db\master_db.sql" kani
mysql -u root -e "source C:\xampp\htdocs\internet_wk_1.7\db\master_db_tracker.sql" kani
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.