I am a fairly new student currently enrolled in Python and SQL for Data Science course from a website called Scaler. As part of the course, I am trying to understand the concepts of MySQL.
The instructor provided an SQL file named imdb.sql and demonstrated how to upload it to MySQL using the source command. However, whenever I try to do the same, I encounter the following error:
ERROR:
mysql> source D:\sqlpracticescaler\imdb.sql;
--------------
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe Ver 8.0.37 for Win64 on x86_64 (MySQL Community Server - GPL)
Connection id: 10
Current database: imdb
Current user: root@localhost
SSL: Cipher in use is TLS_AES_256_GCM_SHA384
Using delimiter: ;
Server version: 8.0.37 MySQL Community Server - GPL
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: cp850
Conn. characterset: cp850
TCP port: 3306
Binary data as: Hexadecimal
Uptime: 9 hours 23 min 57 sec
Threads: 2 Questions: 31 Slow queries: 0 Opens: 145 Flush tables: 3 Open tables: 64 Queries per second avg: 0.000
--------------
ERROR:
Unknown command '\i'.
ERROR:
Failed to open file 'D:qlpracticescaler\imdb.sql', error: 2
I have double-checked the file path and ensured the file exists.
Additional Information: MySQL version: mysql Ver 8.0.37 for Win64 on x86_64 (MySQL Community Server - GPL) Operating system: Windows 64-bit operating system Size of imdb.sql file: 150,181 KB
What could be causing this error, and how can I successfully upload the imdb.sql file to my MySQL database using the source command?
Any help or guidance would be greatly appreciated. Thank you!
source D:\\sqlpracticescaler\\imdb.sql;(or use/)