Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By jleeomc

Thread: Missing Database Permissions, can't upgrade to 6.5.12

  1. #1
    ilsymo Guest

    Default Missing Database Permissions, can't upgrade to 6.5.12

    Hello, I'm trying to upgrade from 6.5.0 to version 6.5.12 but in Update wizard I see the error message:

    Database Privileges: Show Missing Database Permissions
    Necessary Privilege
    ALTER TABLE [table] ADD COLUMN [column]
    ALTER TABLE [table] CHANGE COLUMN [column]
    ALTER TABLE [table] DROP COLUMN [column]

    Here attached the UpgradeWizard log where I can't see which tables are missing permissions. Through phpmyadmin I granted all privileges to db tables.

    Thanks in advance
    Simone
    Attached Files Attached Files

  2. #2
    duprazm is offline Sugar Community Member
    Join Date
    Jul 2010
    Location
    Lugano, Switzerland
    Posts
    12

    Default Re: Missing Database Permissions, can't upgrade to 6.5.12

    hello,

    run this query against your database: show grants for <your_sugar_db_user>;

    if it's different from this result: GRANT ALL PRIVILEGES ON *.* TO '<your_sugar_db_user>'@'%' IDENTIFIED BY PASSWORD '<your_encoded_password>' you'll need to grand the necessary privileges to your sugar db user

    i.e. GRANT ALL ON *.* TO '<your_sugar_db_user>'@'%';

    Matteo

  3. #3
    jleeomc is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    35

    Default Re: Missing Database Permissions, can't upgrade to 6.5.12

    Quote Originally Posted by ilsymo View Post
    Hello, I'm trying to upgrade from 6.5.0 to version 6.5.12 but in Update wizard I see the error message:

    Database Privileges: Show Missing Database Permissions
    Necessary Privilege
    ALTER TABLE [table] ADD COLUMN [column]
    ALTER TABLE [table] CHANGE COLUMN [column]
    ALTER TABLE [table] DROP COLUMN [column]

    Here attached the UpgradeWizard log where I can't see which tables are missing permissions. Through phpmyadmin I granted all privileges to db tables.

    Thanks in advance
    Simone
    --------------------

    After do all that granting stuff, mine did not work. Then my peer to a look and determined:

    these were the errors in the log file:
    Fri Apr 26 22:23:27 2013 [2873][1][INFO] Query:ALTER TABLE temp add COLUMN test varchar NULL
    Fri Apr 26 22:23:27 2013 [2873][1][INFO] Query Execution Time:6.6995620727539E-5
    Fri Apr 26 22:23:27 2013 [2873][1][FATAL] Query Failed: ALTER TABLE temp add COLUMN test varchar NULL : MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1

    the SQL that was created: ALTER TABLE temp add COLUMN test varchar NULL is wrong...

    The fix is to modify the include/database/DBManager.php after about line 2483:

    protected function oneColumnSQLRep($fieldDef, $ignoreRequired = false, $table = '', $return_as_array = false)
    {
    $name = $fieldDef['name'];
    $type = $this->getFieldType($fieldDef);
    $colType = $this->getColumnType($type);

    if($parts = $this->getTypeParts($colType))
    {
    $colBaseType = $parts['baseType'];
    $defLen = isset($parts['len']) ? $parts['len'] : '255'; // Use the mappings length (precision) as default if it exists
    }
    else
    {
    $colBaseType = $colType;
    $defLen = $fieldDef['len'];
    }

    if(!empty($fieldDef['len'])) {


    **** Add, as in above:
    else
    {
    $colBaseType = $colType;
    $defLen = $fieldDef['len'];
    }



    This worked for me....

    Jon
    Chris_C likes this.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Missing Database Permissions
    By ttremain in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2013-03-06, 03:54 PM
  2. Missing Database Permissions
    By ttremain in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2012-08-30, 04:17 AM
  3. Replies: 8
    Last Post: 2011-06-22, 06:46 AM
  4. Replies: 2
    Last Post: 2011-06-10, 01:42 AM
  5. Database permissions on upgrade wizard
    By dprandi in forum Installation and Upgrade Help
    Replies: 9
    Last Post: 2009-11-11, 11:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •