Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Workbench doesn't detect .dump files

    20:07:08 Restoring C:\prog\test_db-master\employees.sql
Running: mysql.exe --defaults-file="c:\users\ariell~1\appdata\local\temp\tmp2jypno.cnf"  --protocol=tcp --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=employees  < "C:\\prog\\test_db-master\\employees.sql"
ERROR at line 113: Failed to open file 'load_departments.dump', error: 2

Operation failed with exitcode 1
20:07:09 Import of C:\prog\test_db-master\employees.sql has finished with 1 errors

I am trying to import the sample Employees DB from the MySQL site from Workbench, but the program for some reason cannot read the .dump files that are in the same directory as the employees.sql that I pointed Workbench to.

employees.sql at line 112-113 reads:

SELECT 'LOADING departments' as 'INFO'; source load_departments.dump ;

And it continues like such with the rest of the .dump files. These files aren't corrupted, I can open them in Notepad, and it is just the usual INSERT-INTO SQL queries.

It only works if i select each .dump file manually to import. Why is this?


1 Answers

Open employees.sql in editor. in line 112-113 you have:

"SELECT 'LOADING departments' as 'INFO';
source load_departments.dump ;"

AND NOW change the second line to:

source C:/load_departments.dump ;

(If you have your file load_departments.dump just in C:) or enter path to any folder You have Your .dumb files /and later sql file/. do the same with next paths to files in employees.sql

You can also change environment path but the one I described is much simpler I think

like image 152
mpruchni Avatar answered May 19 '26 13:05

mpruchni