0

I was importing a CSV file in MySQL when I got a -secure-file-priv error, I searched here and it said I need to set the global variable for local-infile system. I ran that command and it worked. The next step was to quit the server. I tried with exit, \q, \quit, \exit, \quit and more possible variations, but all of them shows the '1064: Syntax Error'. I tried all of this with adding ; as well, but it still showed the error. What's the issue here?

I followed the answers to this question. (I could've added a comment on the answer and asked the author but I just joined the website today so I don't have enough reputation to comment yet and also am new to MySQL so I am putting this as a question here. I tried searching the internet a lot but couldn't find an answer.)

2
  • Check if you have any invalid query from previous queries in your console. just type a semicolon (; and press enter). this will terminate any open invalid query. Also do the same thing with any open quote, type an ending quote and then enter. then type exit and enter Commented Feb 11, 2022 at 8:51
  • Those are internal commands of the official command-line utility. This would typically not work on other clients. Is that what you're using? Commented Feb 11, 2022 at 8:56

1 Answer 1

1
 exit, \q, \quit, \exit, \quit

Above commands only exit MySQL command prompt.

To stop mysql server, under the mysql install location(such as C:\Program Files\MySQL\MySQL Server 8.0), execute below command:

mysqladmin -u root -p shutdown
Enter password: ********
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.