Ad Widget

Collapse

Upgrade from 5.0.23 to 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbilger
    Junior Member
    • May 2022
    • 1

    #1

    Upgrade from 5.0.23 to 6.0

    Hi,
    I managed to successfully upgrade MySQL from 5.7.8 to 8.0 with Zabbix working fine.
    When I've upgraded follow your guide: https://www.zabbix.com/documentation.../debian_ubuntu
    I can see the first time the new Zabbix starts up - upgrade halts at 10% giving me this forever loop:
    18206:20220509:135013.970 database is down: reconnecting in 10 seconds
    18206:20220509:135023.973 database connection re-established
    18206:20220509:135023.973 database upgrade failed
    18384:20220509:135034.047 Starting Zabbix Server. Zabbix 6.0.4 (revision 3d787ff402e).
    18384:20220509:135034.047 ****** Enabled features ******
    18384:20220509:135034.047 SNMP monitoring: YES
    18384:20220509:135034.047 IPMI monitoring: YES
    18384:20220509:135034.048 Web monitoring: YES
    18384:20220509:135034.048 VMware monitoring: YES
    18384:20220509:135034.048 SMTP authentication: YES
    18384:20220509:135034.048 ODBC: YES
    18384:20220509:135034.048 SSH support: YES
    18384:20220509:135034.048 IPv6 support: YES
    18384:20220509:135034.048 TLS support: YES
    18384:20220509:135034.048 ******************************
    18384:20220509:135034.048 using configuration file: /etc/zabbix/zabbix_server.conf
    18384:20220509:135034.137 current database version (mandatory/optional): 05010038/05010038
    18384:20220509:135034.137 required mandatory version: 06000000
    18384:20220509:135034.137 starting automatic database upgrade
    18384:20220509:135034.251 [Z3005] query failed: [2013] Lost connection to MySQL server during query [alter table dashboard modify `userid` bigint unsigned]
    18384:20220509:135034.251 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
    18384:20220509:135034.251 database is down: reconnecting in 10 seconds
    18384:20220509:135044.252 database connection re-established
    18384:20220509:135044.252 database upgrade failed

    Do you have any ideas on what I can do to solve this? I have been looking around but can't seem to find how/why it can't upgrade.

    /Best regards
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Originally posted by mbilger
    Hi,
    I managed to successfully upgrade MySQL from 5.7.8 to 8.0 with Zabbix working fine.
    Originally posted by mbilger
    18384:20220509:135034.137 current database version (mandatory/optional): 05010038/05010038
    18384:20220509:135034.137 required mandatory version: 06000000
    18384:20220509:135034.137 starting automatic database upgrade
    18384:20220509:135034.251 [Z3005] query failed: [2013] Lost connection to MySQL server during query [alter table dashboard modify `userid` bigint unsigned]
    18384:20220509:135034.251 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
    18384:20220509:135034.251 database is down: reconnecting in 10 seconds
    18384:20220509:135044.252 database connection re-established
    18384:20220509:135044.252 database upgrade failed
    The "Lost connection to MySQL" part way through an upgrade strongly implies that MySQL actually crashed. You should review the MySQL log files and your system logs, to see what errors were reported at the time. It could be disk or memory issues, or it could be a software issue in MySQL, but something the upgrade is doing appears to be triggering a crash.

    Comment


    • mbilger
      mbilger commented
      Editing a comment
      Thank you Tim, extended to 8GB ram & more disk - not sure if that was the problem but the DB upgrade completed.
  • Kyle_cb
    Junior Member
    • Nov 2022
    • 1

    #3
    Originally posted by mbilger
    Hi,
    18384:20220509:135034.251 [Z3005] query failed: [2013] Lost connection to MySQL server during query [alter table dashboard modify `userid` bigint unsigned]
    18384:20220509:135034.251 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
    I am having this exact same issue with the same lines in the Zabbix error log and cant seem to make any progress on resolving this looking through the mysql logs. Did you end up finding a solution to this?

    EDIT: In case anyone comes across this thread, in my environment this ended up being resolved by performing the MySQL 5.7 > 8.0 upgrade > Stop MySQL Service > Start MySQL Service(Not 100% sure if this step is required) > Reboot server. I think the part of the MySQL upgrade that runs a script post upgrade(https://dev.mysql.com/blog-archive/m...is-going-away/) was not running without stop/starting the service and/or rebooting.
    Last edited by Kyle_cb; 25-11-2022, 18:51.

    Comment

    Working...