I downloaded and installed a vanilla instance of MySQL 5.7.11 (that's the version it reports when I run > mysql -v
). The instance is up and running.
Then I tried to follow the seemingly simple tutorial here: https://dev.mysql.com/doc/employee/en/employees-installation.html
When I get to the step to run: mysql -t < employees.sql
it fails, giving the error:
ERROR 1193 (HY000) at line 38: Unknown system variable 'storage_engine'
The employees.sql
file is configured as instructed in the tutorial with the default setting. How do I fix this error?
Note: I'm performing all steps as root
in MySQL, and the system is Win10 if that has any bearing.
The tutorial hasn't been updated to reflect changes in recent MySQL versions. From the documentation
This variable is deprecated and was removed in MySQL 5.7.5. Use
default_storage_engine
instead.
If anyone cares to know the fix without finding the updated archive it's relatively simple:
Open the employees.sql file in your editor of choice
Edit lines 38 and 44
// change line 38 from:
set storage_engine = InnoDB;
// to:
set default_storage_engine = InnoDB;
// change line 44 from:
select CONCAT('storage engine: ', @@storage_engine) as INFO;
// to:
select CONCAT('default storage engine: ', @@default_storage_engine) as INFO;
Save employees.sql, then open a console window and navigate to the employees_db
folder. Execute the following command from the prompt and your all set.
c:\employees_db>c:\Path\to\MySql\bin\mysql.exe -u username -p < employees.sql
[root@001 employees_db]# vim employees.sql
set **default_storage_engine** = InnoDB;
-- set storage_engine = MyISAM;
-- set storage_engine = Falcon;
-- set storage_engine = PBXT;
-- set storage_engine = Maria;
select CONCAT('storage engine: ', @@**default_storage_engine**) as INFO;
Two changes needed : default_storage_engine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With