Ubuntu 16.04 first stable distro with MySQL 5.7

Ubuntu 16.04 artwork by Canonical Ltd (CC-BY-SA)
Ubuntu 16.04 artwork by Canonical Ltd (CC-BY-SA).

Congratulations to Ubuntu on releasing 16.04 LTS with MySQL 5.7! As far as I know, it’s the first stable release of a Linux distro that contains MySQL 5.7. Fedora and openSUSE also have MySQL 5.7, but not yet in a stable release.

This means that Ubuntu users can now benefit from all the new features in MySQL 5.7, like JSON support, improved GIS functionality, multi source replication, and more.

The Ubuntu package maintainers and release team worked closely with Oracle engineers to make this happen. Why? Because upgrading a package that so many other packages depend on is not a simple task.

Directly from 5.5 to 5.7

The first challenge was to find out if we could upgrade to 5.7 at all. Ubuntu 16.04 is a Long Term Support (LTS) release that will be maintained for 5 years, and users must be able to upgrade from one LTS to the next. The previous LTS, Ubuntu 14.04, shipped with MySQL 5.5 as default (although 5.6 is also available). However, MySQL upgrades are only officially supported from one version to the next, so in order to go from 5.5 to 5.7, one has to go via 5.6.

This was a potential showstopper, and we considered all options, including building a 5.6 mysql_upgrade that linked with the embedded server library and would only be used to do an intermediate upgrade step. But after a lot of analysis and testing, we decided to go forward with a direct upgrade from 5.5 to 5.7.

Please note that this decision doesn’t change the official support policy for MySQL. The decision to do a direct upgrade was made after careful analysis of the way Ubuntu uses MySQL and how upgrades are handled, and is not a general solution.

Impact on other packages

There are a lot of other software packages that use MySQL, either from the client side, or starting and stopping a server process. MySQL 5.7 contains several changes that impact the interface to other software:

All these changes come with benefits to the user, but they also caused issues in other packages that had to be fixed in order to upgrade to MySQL 5.7. In addition to these differences between MySQL 5.5/5.6 and 5.7, there were changes in how Ubuntu packages MySQL.

The last weeks have been quite hectic, but in the end, the result is worth it. Once again, congratulations on the Ubuntu 16.04 LTS release, and congratulations on the upgrade to MySQL 5.7!

About Norvald H. Ryeng

Norvald has been at Oracle since 2011 and is the MySQL optimizer team lead, responsible for query optimization and execution. He holds a PhD in Computer and Information Science from the Norwegian University of Science and Technology.

8 thoughts on “Ubuntu 16.04 first stable distro with MySQL 5.7

  1. Hello,
    I have seen on ubuntu lts 16:04 update since gives me mysql following error message;
    Call to undefined function: mysql_connect (). Please install the MySQL Connector for PHP
    Maybe you can give me a tip here.
    Greetings Thomas

  2. Hi,

    Where is the MySQL 5.7 Connector/ ODBC library (libmyodbc package) for Ubuntu 16.04 LTS. I tried building the library from the earlier myodbc-5.1.10 source distribution but it generates compile errors:

    stringutil.c: In function ‘sqlchar_as_sqlwchar’:
    stringutil.c:71:29: error: too few arguments to function ‘my_malloc’
    SQLCHAR *u8= (SQLCHAR *)my_malloc(u8_max, MYF(0));
    In file included from /usr/include/mysql/my_sys.h:24:0,
    from ../MYODBC_MYSQL.h:30,
    from stringutil.h:37,
    from stringutil.c:32:
    /usr/include/mysql/mysql/service_mysql_alloc.h:66:15: note: declared here
    extern void * my_malloc(PSI_memory_key key, size_t size, myf_t flags);

    1. Hi Brad,

      Unfortunately libmyodbc is not part of Ubuntu 16.04. If you build it yourself, I think you have to link statically with libmysqlclient.a.


  3. Hi,

    Is there restriction about accessing mysql root account from a OS user different than root?
    myhost:/> sudo mysql -u root -p -> works!
    myhost:/> mysql -u root -p -> does not work


    1. Hi Raf,

      The installation prompts you for a password for the MySQL root account. If you don’t enter a password, the root account will be set up with Unix socket authentication (https://dev.mysql.com/doc/refman/5.7/en/socket-authentication-plugin.html). That means that the system root user may log in as root without a password. If you really want an empty password for the root account, you’ll have to switch to another authentication plugin.


Leave a Reply