Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Error Upgrading to 2.3


Reply

683 Views

Avatar
gkinane

16 March 2009 at 10:27pm Community Member, 22 Posts

During the upgrade (/dev/build) process I get this error :
User Error] Couldn't run query: ALTER TABLE `PageComment` ADD `CommenterURL` varchar(255) character set utf8 collate utf8_general_ci, ADD `AuthorID` int(11) not null default '0', ADD index `AuthorID` (AuthorID), CHANGE `Name` `Name` varchar(200) character set utf8 collate utf8_general_ci ALTER command denied to user 'kumar'@'localhost' for table 'pagecomment'
GET /dev/build/?flush=1

Line 394 in /home/beena/public_html/sapphire/core/model/MySQLDatabase.php
Source

385 }
386
387 function databaseError($msg, $errorLevel = E_USER_ERROR) {
388 // try to extract and format query
389 if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
390 $formatter = new SQLFormatter();
391 $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
392 }
393
394 user_error($msg, $errorLevel);
395 }
396 }
397
398 /**
399 * A result-set from a MySQL database.
400 * @package sapphire

Trace

* Couldn't run query: ALTER TABLE `PageComment` ADD `CommenterURL` varchar(255) character set utf8 collate utf8_general_ci, ADD `AuthorID` int(11) not null default '0', ADD index `AuthorID` (AuthorID), CHANGE `Name` `Name` varchar(200) character set utf8 collate utf8_general_ci ALTER command denied to user 'kumar'@'localhost' for table 'pagecomment'
Line 394 of MySQLDatabase.php
* MySQLDatabase->databaseError(Couldn't run query: ALTER TABLE `PageComment` ADD `CommenterURL` varchar(255) character set utf8 collate utf8_general_ci, ADD `AuthorID` int(11) not null default '0', ADD index `AuthorID` (AuthorID), CHANGE `Name` `Name` varchar(200) character set utf8 collate utf8_general_ci | ALTER command denied to user 'kumar'@'localhost' for table 'pagecomment',256)
Line 102 of MySQLDatabase.php
* MySQLDatabase->query(ALTER TABLE `PageComment` ADD `CommenterURL` varchar(255) character set utf8 collate utf8_general_ci, ADD `AuthorID` int(11) not null default '0', ADD index `AuthorID` (AuthorID), CHANGE `Name` `Name` varchar(200) character set utf8 collate utf8_general_ci)
Line 206 of MySQLDatabase.php
* MySQLDatabase->alterTable(PageComment,Array,Array,Array,Array)
Line 163 of Database.php
* Database->endSchemaUpdate()
Line 173 of DatabaseAdmin.php
* DatabaseAdmin->doBuild(,1)
Line 81 of DatabaseAdmin.php
* DatabaseAdmin->build()
Line 118 of DevelopmentAdmin.php
* DevelopmentAdmin->build(Object id #7)
Line 107 of RequestHandler.php
* RequestHandler->handleRequest(Object id #7)
Line 122 of Controller.php
* Controller->handleRequest(Object id #7)
Line 262 of Director.php
* Director::handleRequest(Object id #7,Session)
Line 106 of Director.php
* Director::direct(dev/build/)
Line 115 of main.php

Any help appreciated.

Regards
Gerry