Install MySQL 8.0/5.7 on Fedora 30/29, CentOS/RHEL 7.6/6.10 - Comment Page: 9

Are you looking MariaDB 10.3/10.2 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 8.0 (8.0.16)/5.7 (5.7.26) on Fedora 30/29/28, CentOS 7.6/6.10 and Red Hat (RHEL) 7.6/6.10. This guide works of course with Oracle Linux and Scientific Linux too. [inttf_post_ad1] 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. Install MySQL Database 8.0.16/5.7.26 on Fedora 30/29/28,...

290 comments on “Install MySQL 8.0/5.7 on Fedora 30/29, CentOS/RHEL 7.6/6.10 - Comment Page: 9

1 7 8 9 10 11
    1. Yes, i believe so, but my “/etc/init.d/httpd start” isn’t working. Says there’s no such file or directory.

    2. Hi,
      I had the same problem

      I get this error/message:
      http: syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.modules.d/10-php.conf: Cannot load modules/ in to server: /etc/httpd/modules/ symbol SSLeay_version, version OPENSSL_1.0.1 not defined in file with link time reference

      Do this:

      yum update openssl

    3. Good Solution~~~ Thank you….

      • Step 2 in fedora 22 is not working. yum localinfo command is depriciated in dnf. I had to download rpm manually

    4. can u solve this error
      [[email protected] Desktop]# service mysql start
      Starting MySQL………………………………………………………………… SUCCESS!
      [[email protected] Desktop]# mysqladmin -u root password pinkuupadhyay
      mysqladmin: connect to server at ‘localhost’ failed
      error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
      [[email protected] Desktop]# mysql -u root -p
      Enter password:
      ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)
      [[email protected] Desktop]# mysql -u root -p
      Enter password:
      ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
      [[email protected] Desktop]# mysql -h localhost -u root -p
      Enter password:
      ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
      [[email protected] Desktop]#

      • Hi shaurabh,

        So what password you used on last two attempts?

    5. Thank you for this tutorial. Did this installation many times already, but it is always good to have a tutorial like this that can be followed.

    6. It worked like a charm! :D Thank you VERY much!

      Bye from

    7. I followed the instructions and have according to that I have MySQL 5.5.36 server installed, however the client still shows up as 5.1.73 inside phpMyAdmin. phpMyAdmin gives me a warning message:

      Your PHP MySQL library version 5.1.73 differs from your MySQL server version 5.5.36. This may cause unpredictable behavior.

      How can I fix that? Please someone give me a solution. Thank you!

      • Hi Martin,

        Could you post output of following command:

        rpm -qa mysql\*
    8. Hi JR,

      Here is what I get.

      # rpm -qa mysql\*

    9. Hello,

      I have successfully installed MySQL, but it starts together with the system (as specified in the tutorial). Now, two short questions:

      1. to disable autostart on boot should I enter this under root?

      “systemctl disable mysqld.service”

      2, And how terrible is it (systemwise) to close the computer with mysql server running?

      • Hello Vasile,

        1. Yes, you can disable mysql service it using that command as root.

        2. Do you mean close computer using “poweroff command”? Or close computer using “power switch”?

        • Hello JR,

          I’m so sorry for not getting back on this earlier. I just stopped manually MySQL when booting the computer.

          To your question – close computer – I mean shutting down.

          I mean systemctl kind of controls that the server is starting and closing when I’m starting or shutting down the computer. Once I disable it, I might get into the situation when I shut down my laptop without stopping the server…How bad is that? For Fedora and for MySQL.

          • First, it shouldn’t be fatal at all. If you are just writing something to db, then you might lost it, but normally everything is okay. And you can of course take daily / hourly backups to make sure that you can restore your db easily.

            I understand what you mean. One possible way is create custom systemctl script to only stop MySQL, but another question, before doing any script is why you don’t want to run MySQL background always? It shouldn’t use CPU or RAM that much, if you are not using it.

            • Hi JR,

              Thank you for your reply. It uses up 100 000 kB, which is not much, but when you have a lot of things pile up, you try to figure what you need on permanent basis.

              I use it for the dev projects to store some data, so losing it would be undesirable. I guess, I’ll stick with running it in the background.

    10. For Fedora 22 starting and enabling mysql :

      systemctl start mysql.service ## use restart after update
      systemctl enable mysql.service

      The correct commands should be:

      systemctl start mysqld.service ## use restart after update
      systemctl enable mysqld.service

      • Thanks Mumo,

        Guide updated and typo fixed.

    11. Once I ran the command(below) on Fedora 22(64-bit):

      dnf install mysql-community-server

      I noticed it replaced a package mariadb though I had not touched it prior.
      Afterwards when I ran the command :


      I am prompted for a root password for which there is no correct response.
      A catastrophic failure on my first attempt at setting up LAMP. Kindly assist

      • If you have never set any root password, then it is just empty. So press just Enter and setup your own password.

      • I am having this same problem. Even leaving the password empty doesn’t work.

    12. Hi JR, I’m having trouble at section 6. I try to give no password for root and then I give a password but it doesn’t work. Here’s what I’m getting

      [[email protected]~]$ /usr/bin/mysql_secure_installation

      Securing the MySQL server deployment.

      Enter password for user root:
      Error: Access denied for user ‘root’@’localhost’ (using password: NO)

      As you can see I didn’t enter a password here. This is a fresh install of MySql on Fedora 23. I can’t seem to find a solution. I’ve searched for a .pid file to reset the password but one doesn’t exist for MySql on my hard drive.

      • Hi Graham,

        Do you have set any root password on your MariaDB installation?

        Here is instructions howto reset your mysql root password.

        If you don’t have any import data on your db, then you could of course remove your installation and reinstall it:

        dnf remove mysql-community-client mysql-community-server
        rm -rf /var/lib/mysql
        dnf install mysql-community-client mysql-community-server
        • Thank you for the reply. I never installed MariaDB so I have no import data on my db.

          I have tried reinstalling MySQL several times using the same commands you specified but that hasn’t fixed the problem.

          I’ve been reading more and it could be that a random password is being generated when the MySQL service is started for the first time. This is my current theory and I’ll be trying the solution at the link below later today. From your experience do you think this could be the problem?

          • You are totally right, root password is really generated randomly, since mysql 5.7.7 RC version. Sorry this is totally my mistake, because I didn’t tested clean installation between minor versions, just updated and everything worked normally.

            I updated this guide, so could you please check/test Step 5. to get your generated password from /var/log/mysqld.log and then try /usr/bin/mysql_secure_installation again.

            • The new steps worked perfectly, thank you!

    13. Hello JR!

      I have recently upgraded to Fedora 23 and discovered that I am missing MySQL Workbench. It is disappointing as I don’t know the MySQL command line commands and have a Java project in Dev that uses the DB already installed and running…

      There is no Workbench RPM for Fedora 23, installing the 22 RPM results in: error: Failed dependencies: is needed by mysql-workbench-community-6.3.5-1.fc22.x86_64

      Running: dnf install libzip

      Returns: Last metadata expiration check performed 0:00:01 ago on Sat Dec 5 20:33:17 2015.
      Package libzip-1.0.1-2.fc23.x86_64 is already installed, skipping.
      Dependencies resolved.
      Nothing to do.

      And, alas, there is no version for Fedora 23:

      I would appreciate any help.

      Thank you!

    14. This is very helpful for me..

      Thank you!

    15. Problem please help: (first of)Hello, this was very helpful thank you for the tutorial.It was a life saver for Fedora 23. I am trying to create an user but it gives me this error
      “ERROR 1819 (HY000): Your password does not satisfy the current policy requirements”

      when i type in
      “create user ‘user_name’@’localhost’ identified by ‘user_name0’;”

      any help would be much appreciated and thank you in advance.

1 7 8 9 10 11

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.