MySQL Server on SUSE 12

When we launched repos for SUSE Linux 11 back in December, we said we would be adding SUSE 12 support as soon as possible, and we are happy to announce that as of last week the repo offers MySQL Server packages for SUSE 12.

It did take us a little bit of extra time to get this done, since SUSE 12 represents a major technological leap over the previous version. Among the most important changes is the move to systemd as init system, and we wanted to make sure that we support that the right way according to SUSE guidelines (by the way, we have important systemd related improvements coming in MySQL 5.7, so this area will be getting even better.)

Another important improvement is that we now enforce strict validation of metadata signing in the repository, as per the SUSE guidelines. And not least, we worked hard to make sure that our packages work as replacement for whatever MySQL-like variant you may already have on your system. The packages have gone through stringent testing of different possible upgrade flows, and the powerful SUSE package manager will recommend different replacement options for you.

The repo has the latest MySQL Server 5.6 and the latest 5.7 development release for you, and the basic steps that will get you the latest MySQL Server 5.6 are as follows:

Go to the download page for the SUSE repository, click the Download button for the repo setup RPM package and install the package like this:

$ sudo rpm -Uvh mysql-community-release-sles12-2.noarch.rpm

Then import the key that will be used to verify the packages that come from the repo:

$ sudo rpm –import /etc/RPM-GPG-KEY-mysql

And then proceed to install the MySQL Server package from the repo:

$ sudo zypper install mysql-community-server

After package is installed, start the MySQL server with the following command:

$ sudo service mysql start

Check the status of the MySQL server with the following command:

$ sudo service mysql status

Initial password for the superuser is set and stored in the error log file. To reveal it, use the following command

$ sudo grep ‘temporary password’ /var/log/mysql/mysqld.log

The next step is to log in with the generated, temporary password and set a custom password for the superuser account:

$ mysql -uroot -p

$ ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘MyNewPass4!’;

For more information, please see:
https://dev.mysql.com/doc/refman/5.7/en/linux-installation-rpm.html

SLES 12 is using systemd, on systemd platforms mysqld_safe is not used, for more information about systemd and MySQL, please consult:
https://dev.mysql.com/doc/refman/5.7/en/using-systemd.html

If you want the source rpm, enable the source subrepository you want, e.g. for MySQL 5.6:

zypper modifyrepo -e mysql56-community-source

And then proceed to install the MySQL source package from the repo:

zypper source-install  -D mysql-community-server

Alternatively, you can get source rpms manually from
http://repo.mysql.com/yum/mysql-5.6-community/sles/12/SRPMS/

And as usual, if you have general comments, leave them in the comments section here, and if you have concrete feature request or come across issues with using our packages and/or the repo in general, please submit a bug report.

Balasubramanian Kandasamy

About Balasubramanian Kandasamy

Balasubramanian Kandasamy has been working as a Principal Member Technical staff in MySQL Release Engineering team at Oracle since 2012. He is responsible for Linux packaging and distribution of various MySQL products. He holds a Bachelor of Engineering in Computer Science from the National Institute of Technology, Surat.

3 thoughts on “MySQL Server on SUSE 12

  1. Hello:

    I tried the above instructions to install on SUSE 12 SP1. After installation, I can not access the server using the root account.

    Is there a default password set for the service?
    Also mysqld_safe can not be located so I can set/reset the root password.

    I really appreciate any help you can provide.
    Thanks,

  2. Hi, thanks for your comment!

    After package is installed and mysql server is started by running:

    $ service mysql start

    initial password for MySQL root account is saved to error log, which have default location of /var/log/mysql/mysqld.log. One way to find password is to run:

    $ sudo grep ‘temporary password’ /var/log/mysql/mysqld.log

    For more information, please see:

    https://dev.mysql.com/doc/refman/5.7/en/linux-installation-rpm.html

    SLES 12 is using systemd, on systemd platforms mysqld_safe is not used, for more information about systemd and MySQL, please consult:

    https://dev.mysql.com/doc/refman/5.7/en/using-systemd.html

Leave a Reply

Your email address will not be published. Required fields are marked *

Please enter * Time limit is exhausted. Please reload the CAPTCHA.