Tuesday, February 22, 2022

[FIXED] can not run a sql file windows command line using SOURCE command

Issue

hi i am using windows 7, xampp

. i am trying to run a sql file using CMD ut it gives me an error

ERROR:
Unknown command '\x'. 

this is what i am doing

enter image description here

this command is not working

mysql> SOURCE C:\xampp\htdocs\elephanti2\db\mas_gis_city_ip.sql;

*** one other problem with this works fine when i tried by go to phpmyadmin and import the file .

why this happening , i have no idea , please help ..................


Solution

My original answer:

mysql> SOURCE C:\\xampp\\htdocs\\elephanti2\\db\\mas_gis_city_ip.sql;

You could also try executing the command like this:

mysql> SOURCE C:/xampp/htdocs/elephanti2/db/mas_gis_city_ip.sql;

(Source: a comment in the reference manual suggests using forward slashes on Windows machines)



Answered By - dwurf

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.