Restoring data from dumped sql file gives: mysql: unknown option '--innodb_file_per_table I was trying to separate DB indexes from ibdata1 I took the steps in what-is-the-best-way-to-reduce-the-size-of-ibdata-in-mysql

I dumped data, dropped databases, and started mysql service.

I got the following error and now I'm stuck:  

mysql -u root -p &lt; alldb.sql
mysql: unknown option '--innodb_file_per_table'


What is the solution now?  

When I remove the below lines from my.cnf everything works fine:  

[mysql]
innodb_file_per_table
innodb_flush_method=O_DIRECT
innodb_log_file_size=1G
innodb_buffer_pool_size=4G


Why innodb_file_per_table is an unknown option?

The weired thing is that I can set innodb_file_per_table dynamically and it separates .ibd file when I alter them to InnoDB engine.



EDIT:
It should be an unknown option as I've put it below [mysql] not [mysqld]. I went through the process again and now it works just fine. ibd files are in their respective database folder.  

Phew...
Problem solved:  

It should be an unknown option as I've put it below [mysql] not [mysqld]. I put all the parameters below [mysqld] and I went through the process again and now it works just fine. ibd files are in their respective database folder.