Share » Forums » Install & configuration » Error: eZMySQLDB Query error: Table...

Error: eZMySQLDB Query error: Table doesn't exist.

Error: eZMySQLDB Query error: Table doesn't exist.

Tuesday 25 August 2009 10:37:35 am - 7 replies

Author Message

Robin Muilwijk

Sunday 06 September 2009 3:03:36 am

Hi,

Is your problem solved already? And if not, what if you try a repair with phpMyAdmin on the sessions table?

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

André R.

Sunday 06 September 2009 7:49:32 am

If anyone else gets this problem, just run this(valid for 4.1.x and 4.2.x, remove user_hash line for 4.0.x) to restore the table*:

DROP TABLE IF EXISTS `ezsession`;
CREATE TABLE `ezsession` (
  `data` longtext NOT NULL,
  `expiration_time` int(11) NOT NULL default '0',
  `session_key` varchar(32) NOT NULL default '',
  `user_id` int(11) NOT NULL default '0',
  `user_hash` varchar(32) NOT NULL default '',
  PRIMARY KEY  (`session_key`),
  KEY `expiration_time` (`expiration_time`),
  KEY `ezsession_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

If your running something else then mysql, change last line to ");"!
* empty, but session data isn't something you need to keep anyway.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Robin Muilwijk

Sunday 06 September 2009 9:05:30 am

Hi André,

Just out of curiousity, what is the problem behind it, that running this script is required?

Thanks, Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

André R.

Monday 07 September 2009 1:02:16 am

His session table seems to be corrupted, so if it doesn't help to repair it, he can simply recreate it, thats all.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Robin Muilwijk

Monday 07 September 2009 11:34:24 am

Thanks for the answer André.

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Petter Neumann

Wednesday 09 September 2009 3:14:18 pm

Hi !

Recreation of the table removed that error, but it seems that I still got corrupted tables.

<i>Table 'databasename.ezuser' doesn't exist</i>

Is there any location in the instalation files I can find the <i>CREATE TABLE 'tablename' </i> definiton for other tables as shown in André R. ' s reply ??

What will the syntax be for recreating the 'ezuser' table ?? If recrating the 'ezusers' table, how to recreate the admin user from mysql ?? Ezpublish is version 4.13/ Mysql

/ Petter

André R.

Thursday 10 September 2009 12:44:40 am

You can't recreate other tables like this. Well you can, but you'll lose data and make the whole site unstable as other tables might contain data that depends on the table you recreate.
In the case of ezuser, it's the users of the system, without it, no one can login.

If you have to get data out of the database, you could try to rename the table, install a fresh eZ Publish install separately and copy the ezuser table over. Then anonymous (id=10) and admin (id=14) will normally work. But you'll probably just hit another table that is corrupted, and you will most likely not be able to do the same with that one.

This is the very reason why backups to external media are important.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu