0

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 < 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...

5
  • 1
    What version of MySQL? Aug 12, 2014 at 13:32
  • @DerekDowney, MySQL version is: 5.5.37
    – Alireza
    Aug 12, 2014 at 13:36
  • its located below [mysql] rather than [mysqld]. is it important?
    – Alireza
    Aug 12, 2014 at 13:51
  • 1
    Hmph, I swear I looked at [mysql] vs [mysqld]. Ah, I did...but you edited it earlier in the process...Oh well, glad you figured it out :) Aug 13, 2014 at 13:21
  • @DerekDowney, I should have mentioned that in the EDIT part instead of replacing it with the new one, but thanks anyway. ;-)
    – Alireza
    Aug 15, 2014 at 6:52

2 Answers 2

1

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.

0

It seems like your my.cnf is missing the value for innodb_file_per_table. Try to add a value for the option, like this:

innodb_file_per_table=1

4
  • mysql: unknown variable 'innodb_file_per_table=1'
    – Alireza
    Aug 12, 2014 at 13:33
  • Is innodb_file_format=Barracuda set?
    – tba
    Aug 12, 2014 at 13:37
  • How to check that?
    – Alireza
    Aug 12, 2014 at 13:43
  • 1
    SELECT @@innodb_file_per_table; should return 1 and SELECT @@innodb_file_format; should return Barracuda
    – tba
    Aug 12, 2014 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.