Install MySQL 8.0/5.7 on Fedora 28/27, CentOS/RHEL 7.5/6.9 - Comment Page: 10

Are you looking MariaDB 10.2/10.1/10.3 Install guide? MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. This is guide, howto install or upgrade MySQL Community Server latest version 5.7 (5.7.22)/8.0 (8.0.11) on Fedora 28/27/26, CentOS 7.5/6.9 and Red Hat (RHEL) 7.5/6.9. This guide works of course with Oracle Linux and Scientific Linux too. Note: If you are upgrading MySQL (from earlier version), then make sure that you backup (dump and copy) your database and configs. And remember run mysql_upgrade command. [inttf_post_ad1] Install MySQL Database 5.7.22/8.0.11 on Fedora...

280 comments on “Install MySQL 8.0/5.7 on Fedora 28/27, CentOS/RHEL 7.5/6.9 - Comment Page: 10

1 8 9 10
    1. Hi,

      I’ve followed the procedure above an at point 6 I run into problems. How can I change the root password to something that MySQL accept? ( I give a 10 letter password below with Capitals and numbers in it)

      # /usr/bin/mysql_secure_installation

      Securing the MySQL server deployment.

      Connecting to MySQL server using password in ‘/root/.mysql_secret’
      The ‘validate_password’ plugin is installed on the server.
      The subsequent steps will run with the existing configuration
      of the plugin.
      Using existing password for root.

      Estimated strength of the password: 100
      Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

      New password:

      Re-enter new password:

      Estimated strength of the password: 50
      Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y
      … Failed! Error: Your password does not satisfy the current policy requirements

      Reply
      • Hi Thommy,

        Following is from MySQL docs:


        The three levels of password checking are LOW, MEDIUM, and STRONG. The default is MEDIUM; to change this, modify the value of validate_password_policy. The policies implement increasingly strict password tests. The following descriptions refer to default parameter values; these can be modified by changing the appropriate system variables.

        LOW policy tests password length only. Passwords must be at least 8 characters long.

        MEDIUM policy adds the conditions that passwords must contain at least 1 numeric character, 1 lowercase and uppercase character, and 1 special (nonalphanumeric) character.

        STRONG policy adds the condition that password substrings of length 4 or longer must not match words in the dictionary file, if one has been specified.

        Default level is MEDIUM, so you need at least 1 numeric character, 1 lowercase and uppercase character, and 1 special (nonalphanumeric) character. Alternatively you can change it to LOW, then at least 8 characters long password should be okay.

        Or you can disable it using:

        
        [mysqld]
        validate-password=OFF
        
        Reply
        • Thanks JR, that did the trick. Can’t see how I missed the special character. Got to get some sleep maybe …

          Reply
    2. To Fedora 24

      #systemctl start mariadb
      # systemctl enable mariadb

      Reply
    3. To Fedora 24

      #systemctl start mariadb
      # systemctl enable mariadb

      Reply
    4. Hi
      I am Sourbh.
      I got output after 6th step.
      ******How to resolve it?******
      ****** Explain please ******

      [[email protected] Sourabh]# /usr/bin/mysql_secure_installation

      Securing the MySQL server deployment.

      Enter password for user root:
      Error: Access denied for user ‘root’@’localhost’ (using password: YES)
      [[email protected] Sourabh]#

      Reply
    5. This is not working for me. After successful installation I encountered this :
      .
      .
      .
      .
      Complete!
      [[email protected]~]#
      [[email protected]~]# /etc/init.d/mysql start
      -bash: /etc/init.d/mysql: No such file or directory
      [[email protected]~]# service mysql start
      Redirecting to /bin/systemctl start mysql.service
      Failed to start mysql.service: Unit not found.

      Reply
      • try use that command:

        # service mysqld start

        Should use mysqld instead of mysql

        Reply
    6. Tanks, this post, save my life.

      Reply
    7. firewall-cmd –permanent –zone=public –add –port=3306/tcp
      should change to
      firewall-cmd –permanent –zone=public –add-port=3306/tcp

      Reply
    8. How do I remove the randomly generated password?
      “mysqladmin -u root password ”

      gives

      “mysqladmin: connect to server at ‘localhost’ failed
      error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’ “

      Reply
      • Hi Uber Knight

        You can change it using following alter user command:

        ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

        First you have to of course login using random password from log.

        Reply
    9. Hello and thank you for the tutorial. Unfortunately it didn’t work for me at step 3a
      Error:
      Problem: problem with installed package mariadb-tokudb-engine-3:10.2.12-5.fc27.x86_64
      – package mariadb-tokudb-engine-3:10.2.12-5.fc27.x86_64 requires mariadb-server(x86-64) = 3:10.2.12-5.fc27, but none of the providers can be installed
      – package mysql-community-server-5.7.20-1.fc27.x86_64 obsoletes mariadb-server provided by mariadb-server-3:10.2.12-5.fc27.x86_64
      – conflicting requests
      – package mysql-community-server-5.7.21-1.fc27.x86_64 obsoletes mariadb-server provided by mariadb-server-3:10.2.12-5.fc27.x86_64

      Also doing a “sudo dnf update” shows conflicts in all of the mentioned libraries:
      Problem 1: package mariadb-tokudb-engine-3:10.2.12-5.fc27.x86_64 requires mariadb-server(x86-64) = 3:10.2.12-5.fc27, but none of the providers can be installed….

      It also skips packages for broken dependencies:
      community-mysql-server x86_64 5.7.19-6.fc27 fedora

      and mysql-community-server x86_64 5.7.20-1.fc27 mysql57-community

      Would you please suggest a to fix?

      Reply
      • Hello JR,

        A small update: I have just added this to /etc/dnf/dnf.conf:
        “exclude=mysql-community*”
        to get rid of the annoying messages during updates. Of course it doesn’t fix my issue :-)

        Reply
        • Hello Vasile,

          If you exclude mysql-community, then it’s impossible install it?

          Could you post output of following commands:

          dnf list installed |grep -e mysql -e mariadb |sort -V
          
          dnf repolist --all
          
          Reply
          • Hi JR, I am not sure whether you will ever see this but I will give it a try :-) Doing sudo dnf remove ‘mariadb-*’ allowed me to successfully complete the installation. Thank you very much!

            Reply
            • Hi Vasile,

              Nice to hear that you got it installed. You’re welcome!

              Reply
    10. Fantastic article! This is exactly what I’ve been trying to do. But I have a couple questions.

      1. When you enable the Mysql repository, do you not have dependency issues when doing a system Update later on?

      2. I have a 5.1 database I want to upgrade – will mysql_upgrade on these binary files work from 5.1 to 5.7?

      Reply
      • Hi Galaxy_Stranger,

        What distro you are running? Is it production server?

        Always backup your data first and if possible, test your installation on test server first with same setup.

        Reply
    11. Instructions do NOT work on Redhat.

      No package mysql-community-server available.

      Reply
      • Hello John,

        Did you installed MySQL YUM repo on step 2.?

        Could you post output of following command:

        yum repolist all
        
        Reply
    12. Good Tutorial, Thank you very much.

      Reply
    13. So Many thanks, it is a clear and professional howto.

      Reply
1 8 9 10

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close