Good time of day!

Please specify how I can import the .sql file into the mysql via the command line. BUT , this SQL file only stores the SQL INSERT request.

Approximately this type:

INSERT INTO `table` VALUES (1,2,3,4); INSERT INTO `table` VALUES (2,2,3,4); INSERT INTO `table` VALUES (3,2,3,4); 

PS source file.sql, db <file.sql not suitable.

    2 answers 2

    mysql -uuser -ppass db_name <file.sql - not suitable?

    • 1064 - You have an error in your SQL syntax; check the syntax for your right syntax to use the mysql -uroot -p8658000 kot <C: /1.sql 'at line 1 Duc example), then the whole OK is loaded - but it's a long time ((For almost 2 million lines. - DVirt
    • >> C: /1.sql So you first need to upload the file to the server, and then specify its correct path. - ModaL
    • I'm trying to boot to LAN, through the console built into the navicat. Example commands: mysql> use kot; Database changed mysql> source C: \ 1.sql; 1064 - You have an error in your SQL syntax; check the syntax of the script: SELECT * FROM authentication LIMIT 0, 1; | id | key | create | remove | + ---- + ---------------------------------- + --------- ------------ + -------- + | 1 | c67a7ac736e13906379cae4e86449b24 | 2015-01-21 22:20:48 | NULL | 1 row in set mysql> - DVirt

    Let's determine where the muscle is: locally (on your computer) or on the network (on a remote server)? If it is local and under Windows, then your command to open the dump is correct, if on remote, then you must first upload the file to the server.

    The server's answer is simple: "syntax error" - to us here .

    And check the server versions: the one from whom the dump was made and yours. And in general, check, and in your database there are tables with the necessary names, in which you write data or is it just an empty database? Otherwise, you will need CREAT TABLE ...
    And google more ...