2

I tried to run this command in shell:

mysql> source /path/*.sql

But I did not have any results. Do you have any suggestions what is wrong?

1

1 Answer 1

3

You can try to use Bash like this:

cat *.sql | mysql

or

cat script*.sql | mysql -u root -pmypassword  yourdatabase
Sign up to request clarification or add additional context in comments.

3 Comments

Just an addendum, this works as long as the statements are terminated by ;
i tried but the result on shell is this: mysql> cat *.sql | mysql -> and than i cannot do anything on file in my folder /path/to/folder/files.sql
the second one is correct in my case :) thank you so much

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.