silent upgrade 8.0.3 to 9.0 seems stuck on Applying the 'utf8mb4_general_ci' collation

I am trying to upgrade my development environment from 8.0.3 to 9.0.0 but it appears to get stuck on

 

 [Upgrader] - Applying the 'utf8mb4_general_ci' collation to the database and all existing tables

 

I did not have this problem with the developer release but I was testing on a copy of the instance with little or no data, I am not sure if that makes a difference.

I ran 

SHOW COLLATION WHERE Charset='utf8mb4'

on my db and utf8mb4_general_ci is the default so I'm not sure why it's not progressing.

 

 

Any suggestions to get things moving along or where to look for problems? 

 

FrancescaS

Parents
  • Hello Francesca! We have the same issue sadly. Have you find the solution for this? 

    Best regards,

    David

  • Gosh it was a long time ago!

    But ,yes, 

    I worked with our DBA to update the collation BEFORE the upgrade, off hours.

    If I recall correctly he did the biggest tables one at a time.

    I dug this out of my old email as the code that I extracted from the upgrade script, but use at your own risk

    public function setCollation($collation)
    
        {
    
            $charset = explode("_", $collation);
    
            $charset = $charset[0];
    
    
    
            $this->query('ALTER DATABASE ' . $this->connectOptions['db_name']
    
                . ' DEFAULT COLLATE ' . $this->quoted($collation));
    
            $res = $this->query("SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'");
    
    
    
            while (($row = $this->fetchRow($res)) !== false) {
    
                $table = array_values($row)[0];
    
                $this->query('ALTER TABLE `' . $table . '` COLLATE ' . $this->quoted($collation));
    
                $this->query('ALTER TABLE `' . $table
    
                    . '` CONVERT TO CHARACTER SET ' . $this->quoted($charset)
    
                    . ' COLLATE ' . $this->quoted($collation));
    
            }
    
        }

    Good luck! Slight smile

    Francesca

Reply
  • Gosh it was a long time ago!

    But ,yes, 

    I worked with our DBA to update the collation BEFORE the upgrade, off hours.

    If I recall correctly he did the biggest tables one at a time.

    I dug this out of my old email as the code that I extracted from the upgrade script, but use at your own risk

    public function setCollation($collation)
    
        {
    
            $charset = explode("_", $collation);
    
            $charset = $charset[0];
    
    
    
            $this->query('ALTER DATABASE ' . $this->connectOptions['db_name']
    
                . ' DEFAULT COLLATE ' . $this->quoted($collation));
    
            $res = $this->query("SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'");
    
    
    
            while (($row = $this->fetchRow($res)) !== false) {
    
                $table = array_values($row)[0];
    
                $this->query('ALTER TABLE `' . $table . '` COLLATE ' . $this->quoted($collation));
    
                $this->query('ALTER TABLE `' . $table
    
                    . '` CONVERT TO CHARACTER SET ' . $this->quoted($charset)
    
                    . ' COLLATE ' . $this->quoted($collation));
    
            }
    
        }

    Good luck! Slight smile

    Francesca

Children