2

I need to execute from mysql shell an SQL file based on a condition like mysql> source @var where @var contains the filename

1 Answer 1

4

This is not possible. source is a command that is recognized and executed locally by the MySQL client program. Variables exist on the server, so the client has no idea what @variable means.

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.