Tentei importar o sql2.sql e não consegui. Estou tentando pelo MySQL. Já usei o source e o caminho do diretório e nada. Salvei o arquivo no diretório C:\Program Files\MySQL\MySQL Server 5.7\bin.
Database changed
mysql> show databses;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'databses' at line 1
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| controle_compras |
| mysql |
| performance_schema |
| sql2 |
| sql3 |
| sys |
+--------------------+
7 rows in set (0.00 sec)
mysql> use sql2;
Database changed
mysql> source C:\Program Files\MySQL\MySQL Server 5.7\bin\sql2.sql;
ERROR:
Unknown command '\P'.
ERROR:
Unknown command '\M'.
ERROR:
Unknown command '\M'.
ERROR:
Unknown command '\b'.
--------------
C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe Ver 14.14 Distrib 5.7.21, for Win32 (AMD64)
Connection id: 3
Current database: sql2
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.7.21-log MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
TCP port: 3306
Uptime: 1 day 1 hour 21 min 7 sec
Threads: 1 Questions: 31 Slow queries: 0 Opens: 108 Flush tables: 1 Open tables: 101 Queries per second avg: 0.000
--------------
ERROR:
Failed to open file 'C:\Program Files\MySQL\MySQL Server 5.7\binql2.sql', error: 2
mysql>