mysql mysql-8.0 add tag
anoldmaninthesea
It's my first time trying to use SQL (I'm learning by myself), and after much work trying to figure out how to install the mySQL server, I'm trying to run the 1st command on the book (Learning SQL by Alan Beaulieu) which I'm using to learn SQL...

I have the sakila example database(sakila-schema.sql, sakila-data.sql and sakila.mwb) in "C:\sakila-db".

I run source c:\sakila-db\sakila-schema.sql; and I get 2 similar tables to the one below


> ~~~  
> C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe  Ver 8.0.21 for Win64 on x86_64 (MySQL Community Server - GPL)\  
> Connection id:          11    
> Current database:       sakila    
> Current user:           root@localhost    
> SSL:                    Cipher in use is TLS_AES_256_GCM_SHA384    
> Using delimiter:        ;    
> Server version:         8.0.21 MySQL Community Server - GPL    
> Protocol version:       10    
> Connection:             localhost via TCP/IP    
> Server characterset:    utf8mb4    
> Db     characterset:    utf8mb4    
> Client characterset:    utf8mb4    
> Conn.  characterset:    utf8mb4    
> TCP port:               3306    
> Binary data as:         Hexadecimal    
> Uptime:                 25 min 2 sec  
> ~~~


and afterwards, the following message:

>     ERROR: Failed to open file 'c:akila-dbakila-data.sql', error: 2


And find this very strange... it seems that mysql is not looking for the right file to begin with. Is '\s' a reserved word? I've tried using double `\`, when writing the path directory, but to no avail...
It just says 

>     ERROR: Unknown command '\\'

Any help would be appreciated.


Edit: in the chat associated to this question, Foggy suggested to run `source c:\sakila-db\sakila-schema.sql` without the `;`, and surprisingly it works, even when at the start of the cmd prompt client in the mysql server it's stated commands must end with `;` or `\g`... Any enlightenment on this issue would be welcomed. ;)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.