Scott
Scott

Reputation: 3

syntax error : 'source' (source) is not valid input at this position

I'm new to mysql. i'm trying to install employees sample database

I tried few as mentioned in stackoverflow but it didn't help

can any one please tell me how to solve this

SELECT 'LOADING departments' as 'INFO';
source load_departments.dump ;
SELECT 'LOADING employees' as 'INFO';
source load_employees.dump ;
SELECT 'LOADING dept_emp' as 'INFO';
source load_dept_emp.dump ;
SELECT 'LOADING dept_manager' as 'INFO';
source load_dept_manager.dump ;
SELECT 'LOADING titles' as 'INFO';
source load_titles.dump ;
SELECT 'LOADING salaries' as 'INFO';
source load_salaries1.dump ;
source load_salaries2.dump ;
source load_salaries3.dump ;

source show_elapsed.sql ;

Upvotes: 0

Views: 1202

Answers (1)

Mike Lischke
Mike Lischke

Reputation: 53345

The source keyword is only supported by the command line client, not MySQL Workbench (it's not a MySQL keyword). Instead load the files mentioned in the source commands manually into MySQL Workbench and run them there.

Alternatively, you can use the command line client as described by the readme of the employees test data github project (https://github.com/datacharmer/test_db):

mysql < employees.sql

Upvotes: 3

Related Questions