Cav Posted November 7, 2009 Share Posted November 7, 2009 I am using a windows pc with xampp and I am trying to import a sql file into a mysql database through the terminal and I have looked through various forums and have came up with nothing this is what I have been using, I have tried log in the terminal and while logged out and it dosen't work , it say syntax error while I am logged in and when I try it when I am logged out it says It can't find the file even through I put in the full path name C:\mysql\data\query_file.sql mysql -u username -ppassword < query_file.sqlHope someone can help Link to comment Share on other sites More sharing options...
justsomeguy Posted November 7, 2009 Share Posted November 7, 2009 If it says there's a syntax error then there's a syntax error in the file. Link to comment Share on other sites More sharing options...
jlhaslip Posted November 8, 2009 Share Posted November 8, 2009 do you have phpmyadmin available?SQL tab will do that for you. Link to comment Share on other sites More sharing options...
shobhitjain Posted November 10, 2009 Share Posted November 10, 2009 Yes jlhaslip is right, Xampp server has got all the tools , php my admin too,You can use that. Link to comment Share on other sites More sharing options...
dsonesuk Posted December 12, 2009 Share Posted December 12, 2009 it such long time since i used the terminal, but didn't you have to include reference to database you are importing to?similar tomysql -u username -ppassword mydatabase < query_file.sql Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.