Loading...
 
Architecture / Installation

Architecture / Installation


Error when upgrading database

posts: 5 USA

Hello,

I'm upgrading my Tiki install from Version 7.2 to 12 LTS, and when running the tiki-install.php page or shell script, I get the following error when upgrading the database:

MySQL INFORMATION_SCHEMA not available. Your MySQL version is too old to perform this operation. (upgrade_20120429_fix_collation_tiki)

Searched and found nothing useful. Any ideas?

See attachment for DB info.

posts: 222 Norway

Check the database user's permissions in INFORMATION_SCHEMA.
You can test by logging in using the db credentials in db/local.php
Then running
SELECT DISTINCT(TABLE_NAME) FROM INFORMATION_SCHEMA.COLUMNS

The update script that fails attempts to set the character set to 'utf8' and collation to 'utf8_unicode_ci'.

If you database tables already use these settings, you can ignore this error.

posts: 5 USA

I just logged into mysql as the database user and ran:
SELECT DISTINCT(TABLE_NAME) FROM INFORMATION_SCHEMA.COLUMNS;

It executes and lists 304 rows successfully.

The database seems to already use utf8 and utf8 unicode ci from what I can see. Is there a way to finish the upgrade? The admin area says that the database upgrade isn't finished.


posts: 1 Canada

There is an error in the update script. I've posted a bug report at http://dev.tiki.org/item5103?itemId=5103

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


File installer/schema/20120429_fix_collation_tiki.php contains an error on line 20:

if ( $results= $installer->fetchAll('SELECT DISTINCT(TABLE_NAME) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ?', $dbs_tiki)


If the DB name has a character in it such as a dash, this returns FALSE and the script (incorrectly) reports that the MySQL version is too old.

I just hardcode my DB name into the query, but the following code patch should work:

if ( $results= $installer->fetchAll("SELECT DISTINCT(TABLE_NAME) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '$dbs_tiki'")

posts: 12

I had exactly this problem, and the fix that samandiriel suggested didn't work: the value of the global variable $dbs_tiki in my case was "tiki", but the database name was "ontm_tiki619", so the if returned false. Hardcoding the database name instead of using $dbs_tiki allowed the upgrade to complete, but elsewhere it tried to update a database named "tiki" — that is, the erroneous value of $dbs_tiki — but I didn't pay too much attention since it was trying to change the collation to utf8_unicode_ci, which it already was.

I think it's a problem with the wrong value being assigned to the global variable $dbs_tiki, and hence not really a problem with this script — but I didn't write the code, and am not diving any further into it than I have to!

Whatever it is, it really should get fixed!


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting