Upgrade to Ubuntu 20 and MySQL 8


Create snapshot or GENERAL backup


  1. Update to uContact >= 3.682

  2. Verify Database for MySQL 8 Upgrade.

    1 mysqlcheck -u root -p --all-databases --check-upgrade

If every chart looks ok, then, within:

1 2 3 /etc/mysql/mysql.conf.d/mysqld.cnf Delete: NO_AUTO_CREATE_USER Delete: query_cache_limit y query_cache_size


If you want to see more details:

1 2 3 4 wget https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell_8.0.26-1ubuntu18.04_amd64.deb dpkg -i mysql-shell_8.0.26-1ubuntu18.04_amd64.deb mysqlsh JS> util.checkForServerUpgrade('usuario@localhost:3306',{"configPath":"/etc/mysql/mysql.conf.d/mysqld.cnf"})


3. Update Operating System.

1 2 3 4 5 6 7 8 9 export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 apt update apt upgrade apt dist-upgrade reboot do-release-upgrade

Yes to restart services and leave the defaults that suggests (just press enter). Select yes to remove the packages that are no longer useful.


4. Install new dependencies.

1 2 3 4 5 6 7 8 9 10 11 12 13 apt autoremove apt-get install -y build-essential net-tools libncurses-dev openssl libssl-dev libtool sox libtiff-dev libtiff-tools libresample1-dev libpcre3-dev apache2-utils xmlstarlet jq glances apt-get install -y libxml2 libxml2-dev bison byacc zip flex gdb libusb-dev minicom dos2unix libgmime-2.6-dev automake linux-headers-$KERNEL locate psmisc mysql-client apt-get install -y ghostscript git libaio-dev freetds-dev tdsodbc msmtp lrzsz htop iotop libsrtp2-dev sshpass libopus-dev opus-tools apt-get install -y texinfo libiksemel-utils libiksemel-dev libjson-perl libvorbis-dev uuid-dev libsqlite3-dev uuid libsox-fmt-mp3 xmlstarlet apt-get install -y libical-dev sendmail libsqlite3-dev fxload libnewt-dev nmap arping dsniff cpulimit fail2ban python-dev sngrep apt-get install -y libogg-dev libvorbis-dev libasound2-dev portaudio19-dev libpq-dev binutils-dev libjansson-dev libspeex-dev libspeexdsp-dev libgsm1-dev uuid-runtime apt-get install -y perl flac libwww-perl mpg123 libsnmp-dev snmp snmpd snmp-mibs-downloader iptraf ntp lame sysstat iftop bwm-ng tftp tftpd software-properties-common apt-get install -y python3 python3-pip pstack libedit-dev libnode-dev node-gyp npm apt-get install -y software-properties-common python3-software-properties apt-get install -y libcurl4-openssl-dev libssl-dev ldconfig

5. New MySQL 8 driver for UnixODBC.

1 2 3 4 wget https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.26-linux-glibc2.12-x86-64bit.tar.gz -P /usr/src/integra/ tar xvzf /usr/src/integra/mysql-connector-odbc-8.0.26-linux-glibc2.12-x86-64bit.tar.gz -C /usr/src/integra/ cp /usr/src/integra/mysql-connector-odbc-8.0.26-linux-glibc2.12-x86-64bit/lib/* /usr/lib/x86_64-linux-gnu/odbc/ sed -i.bak "s/libmyodbc5a/libmyodbc8a/g" /etc/odbcinst.ini


6. Rebuild Asterisk with new dependencies.

1 2 3 4 5 6 7 cd /usr/src/integra/asterisk-13.38.1/ make clean ./configure --with-pjproject-bundled make menuselect.makeopts menuselect/menuselect --enable app_page --enable codec_opus menuselect.makeopts make make install


7. Reboot and check.