ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Had to edit the database with PHPMyAdmin while installing

August 24, 2012 10:02pm

Subscribe [2]
  • #1 / Aug 24, 2012 10:02pm

    Peter Kosenko

    13 posts

    I had to delete auto-increment from the “user_id” field in “exp_mailing_list” and delete the primary index and then create an ordinary index on the field so that the Expression Engine upgrade SQL would be happy redefining the field.

    By noodling around in PHPMyAdmin while the installer was in progress and back buttoning (I suppose that invokes whatever script the installer is stuck at), I managed to get the Installation Script itself to complete.

    However, I now have to fix a ton of other configuration issues that should not be there.

    ***************

    ExpressionEngine Installation and Update Wizard
    You are now running the most current version of ExpressionEngine!
    Very Important:  Using your FTP program, please find the folder named “installer” and delete it from your server.

    You will find this folder located at: /system/installer

    You will NOT be permitted to log into your Control Panel until you do.

    Please bookmark these two links:
    Your Control Panel is located here

    Your Website is located here

  • #2 / Aug 27, 2012 10:51am

    Shane Eckert

    7174 posts

    Consolidating Posts.

  • #3 / Aug 27, 2012 10:51am

    Shane Eckert

    7174 posts

    I am getting the following database error trying to update from EE 1.6.6 to 2.5.3.

    Installation Upgrade seems to FAIL at the point.  There is no option to continue with the upgrade.  So I can’t apparently upgrade to 2.5.2?

    Does EE staff have a suggestion?

    I hope that the installer is not getting a URL out of the database.  I am confronted with other people who replicated the EE installation and database at another URL/server that is running PHP 5.1 for purposes of upgrading a wordpress blog that is also part of the site.  I noticed that I did not have access to the old control panel for some reason either.

    I have access to the database with PHPMyAdmin.  So if I need to get rid of the mailing list table or records or the offending database field, I might be able to do that.

    ********************

    A Database Error Occurred
    Error Number: 1054

    Unknown column ‘ip_address’ in ‘exp_mailing_list’

    ALTER TABLE `exp_mailing_list` CHANGE `ip_address` `ip_address` varchar(45)

    Filename: /domains/galorath.com/www/public_html/system/expressionengine/modules/mailinglist/upd.mailinglist.php

    Line Number: 256


    http://ellislab.com/forums/viewthread/223192/

  • #4 / Aug 27, 2012 10:52am

    Shane Eckert

    7174 posts

    I browser backed out of the previous error and the install apparently continued, with another database error.

    *****************

    A Database Error Occurred
    Error Number: 1068

    Multiple primary key defined

    ALTER TABLE `exp_mailing_list` MODIFY COLUMN `user_id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment

    Filename: /domains/galorath.com/www/public_html/system/expressionengine/modules/mailinglist/upd.mailinglist.php

    Line Number: 239

    http://ellislab.com/forums/viewthread/223193/

  • #5 / Aug 27, 2012 10:53am

    Shane Eckert

    7174 posts

    While the installer was running I used PHPMyAdmin to add the “ip_address” field to “exp_mailing_list” that the installer could not find, then backed out.  The script ran again and the error evaporated.  Now I have another database error to fix.

    ******************

    The function in upd_mailinglist.php that is failing and BLOCKING UPGRADE is the following.  See my last two posts for the error messages.

    See “// Update ip_address column” below.

    There IS in fact NO “ip_address” column in the table as I see it PHPMyAdmin.  So how did the script decide that it was supposed to be there?  I generally don’t use PHPMyAdmin to mess with database details in the middle of installations, but perhaps I should add the field and see if that satisfies EE’s update script.

    I see that we have no entries in the table, since we are not using mailing list functionality.  I would guess that if I deleted the table, the installer would have just created it anew (I did another new installation on my computer to test the installer, and THAT worked).  But you wouldn’t necessarily want to delete a table if it has data just to make a defective upgrade process work.

    However, I cannot be sure that doing that and rerunning the installer would have the same effect.

    class Mailinglist_upd {
    
    . . . .
    
    /**
      * Module Updater
      *
      * @access public
      * @return bool
      */
    function update($current=’‘)
    {
      if (version_compare($current, ‘3.0’, ‘<’))
      {
      $this->EE->db->query(“ALTER TABLE `exp_mailing_list` MODIFY COLUMN `user_id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment”);
      $this->EE->db->query(“ALTER TABLE `exp_mailing_list` DROP KEY `user_id`”);
      $this->EE->db->query(“ALTER TABLE `exp_mailing_list_queue` ADD COLUMN `queue_id` int(10) UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY FIRST”);
      }
    
      if (version_compare($current, ‘3.1’, ‘<’))
      {
      // Update ip_address column
      $this->EE->dbforge->modify_column(
      ‘mailing_list’,
      array(
        ‘ip_address’ => array(
        ‘name’  => ‘ip_address’,
        ‘type’  => ‘varchar’,
        ‘constraint’ => ‘45’
        )
      )
      );
      }
    
      return TRUE;
    }

    http://ellislab.com/forums/viewthread/223197/

  • #6 / Aug 27, 2012 10:55am

    Shane Eckert

    7174 posts

    I do not know what “Multiple primary key defined” MEANS here.  I can see only ONE primary key in the table.  I changed the field length to 11 to see if that would make the function happy with something to chanage, but it has no effect whatsoever.  What is “Multiple primary key defined” supposed to MEAN when the are NOT multiple primary keys?

    When I run the query in PHPMyAdmin I get the same 1068 error.  Why?  Is it a bug in MySQL?

    Um . . . and should upgrading Expression Engine be this difficult?

    I see that this error is listed in other posts but no clear answer is given to it.

    *******************

    This is the next database error.  Some other field is defined as a primary key?

    Actually not.  Existing “user_id” is primary key and auto-increment.
    In fact, it has all the attributes in the MODIFY COLUMN listed below.
    Does the SQL choke when it finds that there is nothing to do?

    A Database Error Occurred
    Error Number: 1068

    Multiple primary key defined

    ALTER TABLE `exp_mailing_list` MODIFY COLUMN `user_id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment

    Filename: /domains/galorath.com/www/public_html/system/expressionengine/modules/mailinglist/upd.mailinglist.php

    Line Number: 239


    http://ellislab.com/forums/viewthread/223198/

  • #7 / Aug 27, 2012 10:58am

    Shane Eckert

    7174 posts

    Hello Peter Kosenko,

    Thank you for posting your question here on the ExpressionEngine forums.

    Just for future reference, please try to keep all communication to one thread. It makes for a lot of extra effort and lost time for both of us if you open several threads on the same topic.

    Where are you now. From what I have pieced together, the top most thread is the most current and that say the install is now complete. Is that true?

    Is there anything else I can help with?

    Cheers,

  • #8 / Aug 27, 2012 6:58pm

    Peter Kosenko

    13 posts

    Things seem to be okay right now, after editing the database with PHPMyAdmin to insert the new base URL into the database fields where the old URL used to be (the site and database were replicated at another URL).  The control panel was a styleless mess until I went to Admin/Configure to reset those paths and get a Control Panel theme working.

    One issue seems to be preventing the site from displaying.  The site itself will not display due to the following error:

    Error
    Unable to load requested field type file:  ft.wysiwyg.php.
    Confirm the fieldtype file is located in the expressionengine/third_party/ directory

    I take it from another post that this is because TinyMCE was installed in version 1.x.  I don’t think we need it, but I cannot find a “ft.wysiwyg.php” file ANYWHERE in the old installation, and I have no idea where it would be configured in the database, if at all.

    **********

    I found the answer to that one in the Forum posts.  Running this SQL solved the problem.

    UPDATE exp_channel_fields SET field_type= ‘textarea’ WHERE field_type=‘wysiwyg’ 

    ****************

    Hello Peter Kosenko,

    Thank you for posting your question here on the ExpressionEngine forums.

    Just for future reference, please try to keep all communication to one thread. It makes for a lot of extra effort and lost time for both of us if you open several threads on the same topic.

    Where are you now. From what I have pieced together, the top most thread is the most current and that say the install is now complete. Is that true?

    Is there anything else I can help with?

    Cheers,

  • #9 / Aug 28, 2012 11:20am

    Shane Eckert

    7174 posts

    Hey Peter,

    Sounds good! Nice detective work.

    Is there anything else I can help with?

    Thank you,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases