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.)

Naiya Shah
  • 31
  • 4
  • 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 – TruckDriver Feb 11 '22 at 08: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? – Álvaro González Feb 11 '22 at 08:56

1 Answers1

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: ********
navylover
  • 12,383
  • 5
  • 28
  • 41