Installation Problems

Jeren

Joined: 2009-02-12
Posts: 7
Posted: Sun, 2009-02-15 22:43

I assume I can post a G3 bug here. If I'm wrong, please move this to the correct forum.

I'm attempting to install Gallery 3.0 Alpha 1 on my VPS for testing. I'm running PHP 5.2.6, Apache 2.2.11, and MySQL 5.0.67.

When entering in my MySQL data, the first time I try it, it says:

"Failed to create tables in your database:Lost connection to MySQL server during query"

Subsequent attempts then give me the error:

"The database you provided already has other tables in it. Continuing with the install might overwrite an existing Gallery install. Please go back and choose a different database."

The only table in there is one named access_cache, with no data (and apparently still being accessed, which sometimes prevents me from clearing the database and trying again).

I've tried making several blank databases and all fail as stated above.

Assistance would be appreciated. I'm really wanting to see what G3 looks like.

Thanks.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-02-15 22:54

I haven't seen this error before. I found this via Google:
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

Can you check your mysql error logs to see if there's more information there?

 
Jeren

Joined: 2009-02-12
Posts: 7
Posted: Sun, 2009-02-15 23:26

Here are my logs. This is me attempting to use a fresh database. Note, I've tried using MySQL 4.1.22 and then MySQL 5.0.67, and both gave me the same errors. This is with MySQL 5.0.67

I've censored my account name.

090215 18:22:52 InnoDB: Error: table `<account>_g3/access_caches` does not exist in the InnoDB internal
090215 18:23:46InnoDB: Assertion failure in thread 3027778448 in file fil0fil.c line 3959
090215 18:23:46 - mysqld got signal 11 ;
090215 18:23:46 mysqld restarted
090215 18:23:46 InnoDB: Database was not shut down normally!
090215 18:23:46 InnoDB: Page dump in ascii and hex (16384 bytes):
090215 18:23:46 InnoDB: Page checksum 2410800423, prior-to-4.0.14-form checksum 3512127480
090215 18:23:46 InnoDB: Started; log sequence number 0 40369806
090215 18:23:47 [Note] /usr/sbin/mysqld: ready for connections.

EDIT: This creates the first error message I reported.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2009-02-16 20:49

I responded in the other thread, but I'll repost the same response here too since this is a better topic for it. Try emptying out your database and then do this:

mysql -u<user> -p<pass> <dbname> < installer/install.sql

That should reinstall all your tables. The SQL there is pretty straightforward (it's a snapshot of an install). Do you get an error doing it that way?

 
Jeren

Joined: 2009-02-12
Posts: 7
Posted: Mon, 2009-02-16 21:10

Yup, got an error.

[root@host g3test]# mysql -u<user> -p<pass> <db>_g3 < installer/install.sql
ERROR 2013 (HY000) at line 4: Lost connection to MySQL server during query
[root@host g3test]#

I tried looking up the other error but it gave info about timing out queries (which I don't think this is doing as it happens very fast).

I'm a bit stumped...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-02-17 03:59

Ok, that is very interesting. Next up, let's run the SQL queries separately. Look in installer/install.sql and you'll see a series of SQL statements, each ending in a semicolon. Clear out your mysql database and let's try running each command one at a time and see what it says. In the example below, mysql> is the prompt from the command line mysql client (you probably already know this, but others will read this too). Here's what the first set of commands would look like for the access_caches table:

$ mysql <db>_g3
mysql> DROP TABLE IF EXISTS `access_caches`;
mysql> SET @saved_cs_client     = @@character_set_client;
mysql> SET character_set_client = utf8;
mysql> CREATE TABLE `access_caches` (
  `id` int(9) NOT NULL auto_increment,
  `item_id` int(9) default NULL,
  `view_full_1` tinyint(2) NOT NULL default '0',
  `edit_1` tinyint(2) NOT NULL default '0',
  `view_full_2` tinyint(2) NOT NULL default '0',
  `edit_2` tinyint(2) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
mysql> SET character_set_client = @saved_cs_client;
mysql> INSERT INTO `access_caches` VALUES (1,1,1,0,1,1);

That's all the commands for the access_caches table. Repeat that for every table until either you get an error, or you successfully install all the tables. If you're successful doing it this way, then we're going to have a serious head-scratching wtf moment. If there's a failure, hopefully we'll learn something.

 
Jeren

Joined: 2009-02-12
Posts: 7
Posted: Tue, 2009-02-17 04:33
Quote:
mysql> use <account>_g3
Database changed
mysql> show table status;
Empty set (0.00 sec)

mysql> DROP TABLE IF EXISTS `access_caches`;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> SET @saved_cs_client = @@character_set_client;
Query OK, 0 rows affected (0.00 sec)

mysql> SET character_set_client = utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE `access_caches` (
-> `id` int(9) NOT NULL auto_increment,
-> `item_id` int(9) default NULL,
-> `view_full_1` tinyint(2) NOT NULL default '0',
-> `edit_1` tinyint(2) NOT NULL default '0',
-> `view_full_2` tinyint(2) NOT NULL default '0',
-> `edit_2` tinyint(2) NOT NULL default '0',
-> PRIMARY KEY (`id`)
-> ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> show table status;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1
Current database: <account>_g3

Empty set (0.01 sec)

mysql> show table status;
Empty set (0.00 sec)

It seems to have something to do with that table creation right there... I don't know why. But I am going to speculate that it may be an issue on my end (though I really don't know what it is right now). I attempted to make a simple, test InnoDB table and I received identical errors.

I've got my server host techies looking into it. I'm hoping they'll have an idea on why that is happening, because I sure don't...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-02-17 04:50

Let me know what your tech folks say. As far as I can tell, the SQL we've got there is perfectly valid (that SQL was in fact generated by MySQL itself!). My guess is that there's some InnoDB misconfiguration on your server. :-/

 
Jeren

Joined: 2009-02-12
Posts: 7
Posted: Tue, 2009-02-17 04:57

Actually, it looks like the server is configured perfectly. What does appear to be a problem is a cPanel update that practically F-ed up InnoDB tables... Hooray for auto updates... (see http://blog.cpanel.net/?p=160 )

From what it looks like, to fix InnoDB on my system would probably wipe my existing InnoDB tables.

Out of curiosity, could those G3 tables work as MyISAM?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-02-17 05:04

They should work as MyISAM, so you could do a search/replace on install.sql and try that to see if it works.

 
Jeren

Joined: 2009-02-12
Posts: 7
Posted: Tue, 2009-02-17 05:23

Using MyISAM did indeed work.

For anyone that may have been affected by corrupt InnoDB as a result of that cPanel update, that could be a workaround.

Out of curiosity, why was the InnoDB engine chosen for G3 tables?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2009-02-18 04:56

I think the main reason for InnoDB was so that we'd support transactions easily. I'll review this decision with the dev team.