Results 1 to 2 of 2
  1. #1

    How to enable InnoDB?

    I can't enable InnoDB, and I don't know why. :-(

    OS: Linux

    If I run the SQL-query "Show Engines", it says:
    InnoDB DISABLED
    So InnoDB seem to be compiled in MySQL but just disabled.

    The My.cnf does NOT have the line "skip-innodb" in it, so that can't be what's wrong here.

    This is what my.cnf looks like:
    Code:
    [mysqld]
    set-variable = max_connections=500
    safe-show-database
    
    [mysqld]
    innodb_file_per_table
    innodb_data_file_path=ibdata1:200M:autoextend
    (I know it's a very short my.cnf file, I don't know why, but that's how it looks.)



    I checked the error-log and here's the output:

    Code:
    InnoDB: Error: tried to read 16384 bytes at offset 0 2444591104.
    InnoDB: Was only able to read 0.
    080107  7:54:26  InnoDB: Operating system error number 0 in a file operation.
    InnoDB: Error number 0 means 'Success'.
    InnoDB: Some operating system error numbers are described at
    InnoDB: http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html
    InnoDB: File operation call: 'read'.
    InnoDB: Cannot continue operation.
    
    Number of processes running now: 0
    080107 07:54:31  mysqld restarted
    InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
    InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
    InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
    InnoDB: Could not open or create data files.
    InnoDB: If you tried to add new data files, and it failed here,
    InnoDB: you should now edit innodb_data_file_path in my.cnf back
    InnoDB: to what it was, and remove the new ibdata files InnoDB created
    InnoDB: in this failed attempt. InnoDB only wrote those files full of
    InnoDB: zeros, but did not yet use them in any way. But be careful: do not
    InnoDB: remove old data files which contain your precious data!
    080107  7:54:36 [Note] /usr/sbin/mysqld: ready for connections.
    Does anyone know what I should do to enable it? I have no idea.

  2. #2
    Hi,
    Your error log states mysql does have the support it needs to run with innoDB support but you`ve modified the size of the ibdata1 file withouth removing the old file first.

    In case you did not have any innodb tables in your mysql installation it`s safe to remove it and restart mysql in order for it to recreate that file.

    IF you did have data in innodb tables, you should edit your my.cnf file and restore the size value of the following line to it`s default:
    'innodb_data_file_path=ibdata1:200M:autoextend '
    // 200M was not the default at installation .

    After which you should export the database using mysql_dump or any other export method you prefer, remove the ibdata file, edit my.cnf with new size, restart mysql, import old data and you should be done.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •