OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Error when trying to upload an SQL file using the source command in MySQL

  • Thread starter Thread starter Bedanta De
  • Start date Start date
B

Bedanta De

Guest
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:

Code:
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!
<p>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.</p>
<p>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:</p>
<pre><code>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
</code></pre>
<p>I have double-checked the file path and ensured the file exists.</p>
<p>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</p>
<p>What could be causing this error, and how can I successfully upload the imdb.sql file to my MySQL database using the source command?</p>
<p>Any help or guidance would be greatly appreciated. Thank you!</p>
 

Latest posts

Top