0

I'm in the process of upgrading from Drupal 6 to Drupal 7 and the upgrade process terminated due to disk usage error.

I found out that ibdata1 occupies 98% of /var. So I decided to empty this file so I can have the space again and re-run the update.php, but I got bunch of SQL PDO error.

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB': SELECT name, value FROM {variable}; Array ( ) in variable_initialize() (line 943 of /var/www/vhosts/drupal/includes/bootstrap.inc).

    mysql> show engines;
    ERROR 2006 (HY000): MySQL server has gone away
    No connection. Trying to reconnect...
    Connection id:    177
    Current database: drupal_drupal

    +------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
    +------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         | NO           | NO   | NO         |
    | MRG_MYISAM | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
    | BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
    | CSV        | YES     | CSV storage engine                                             | NO           | NO   | NO         |
    | MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
    | FEDERATED  | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
    | ARCHIVE    | YES     | Archive storage engine                                         | NO           | NO   | NO         |
    +------------+---------+----------------------------------------------------------------+--------------+------+------------+
    7 rows in set (0.06 sec)

Do you have any idea?

3
  • Presumably you didn't just delete ibdata1 without taking a dump of all the databases on your server first (if you did you'll need to restore it from a backup). Have a look here for the proper steps to take to empty that file and have MySQL recreate it for you
    – Clive
    Jul 15, 2012 at 12:58
  • 1
    That file is where MySQL stores it's data. You can't just delete it because it's big ;). As Clive said, you've hopefully made a backup that allows you to restore your data.
    – Berdir
    Jul 15, 2012 at 13:09
  • Thanks Clive and Berdir...if you can add your answer so I can accept it as it is the steps I should take first before deleting anything owns by MySQL. Thanks for pointing me to the right direction man. Thanks also Berdir. Jul 15, 2012 at 13:36

1 Answer 1

0

This solved my problem.

chmod 775 /var/lib/mysql

Your Answer

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

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