MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Fedora Install of MySQL

with 9 comments

I built a new image on VMWare Fusion for my class, which required installing MySQL 5.6 on Fedora, Version 20. If you don’t know how to add your user to the sudoers list, you should check this older and recently updated blog post.

  1. Download the MySQL Yum Repository and launch the downloaded RPM.
  1. Install MySQL on Fedora, Version 20, which you can find with the following command:
shell> rpm -qa | grep mysql

The fc20-5 changes with point releases, but assuming that you’re installing the fc20-5 release:

shell> sudo yum localinstall mysql-community-release-fc20-5.noarch
  1. Install MySQL on Fedora with the following command:
shell> sudo yum install mysql-server
  1. Start the MySQL service on Fedora with the following command:
shell> sudo service mysqld start
  1. Secure the MySQL installation with the following command:
shell> mysql_secure_installation
  1. Set the MySQL Service to start with the Fedora operating system with the following command (not chkconfig):
shell> sudo systemctl enable mysqld.service

Restart the Fedora operating system to effect the changes.

  1. Reset the MySQL configuration file to enable external connections through Port 3306 with the following changes to the my:

Remark out the socket line, like this:


Add the bind-address and port lines below after you know the actual IP address of the server to the my.cnf file in the /etc directory.

You substitute the actual IP address for the nnn.nnn.nnn.nnn on the bind_address line with the actual IP address returned by the ifconfig command, like this:

shell> ifconfig

Then, add these two lines to the my.cnf file.

  1. Restart the mysqld service with the following syntax:
shell> sudo service mysqld restart

You can check whether MySQL is listening on Port 3306 with this syntax:

shell> sudo netstat –anp | grep 3306

Written by maclochlainn

January 7th, 2014 at 11:04 pm

Posted in Fedora,Linux,MySQL,VMWare

Tagged with , ,

9 Responses to 'Fedora Install of MySQL'

Subscribe to comments with RSS or TrackBack to 'Fedora Install of MySQL'.

  1. I am getting this error when installing mysql-server package.

    Downloading packages:

    mysql-community-server-5.6.15-1.fc20.x86_64.rpm                                                                                |  56 MB  00:01:19     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    error: %pre(mysql-community-server-5.6.15-1.fc20.x86_64) scriptlet failed, exit status 127
    Error in PREIN scriptlet in rpm package mysql-community-server-5.6.15-1.fc20.x86_64


    16 Jan 14 at 3:30 pm

  2. Rodrigo, Are you on the 64-bit version of Fedora? Please run this command:

    sudo uname -a

    It should returns something like:

    Linux localhost.localdomain 3.12.6-300.fc20.x86_64 #1 SMP Mon Dec 23 16:44:31 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


    17 Jan 14 at 12:41 am

  3. […] MySQL Workbench 6.0 isn’t available for Fedora, Version 20 […]

  4. I had the same problem with the 32-bit version, like this:

    Total download size: 55 M
    Installed size: 216 M
    Downloading packages:
    mysql-community-server-5.6.15-1.fc20.i686.rpm              |  55 MB   02:21     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    error: %pre(mysql-community-server-5.6.15-1.fc20.i686) scriptlet failed, exit status 127
    Error in PREIN scriptlet in rpm package mysql-community-server-5.6.15-1.fc20.i686
      Verifying  : mysql-community-server-5.6.15-1.fc20.i686                    1/1 
      mysql-community-server.i686 0:5.6.15-1.fc20                                   

    How does one diagnose this?


    21 Jan 14 at 11:45 am

  5. Reynold,

    Check this post from the Percona web site. It appears similar?



    21 Jan 14 at 11:53 am

  6. Good article but one modification:

    On Fc20, the default “mysql” database is mariaDb, so the service need to be enabled like:

    # systemctl enable mariadb.service

    Joao Neto

    26 Feb 14 at 7:49 am

  7. Joao, but the post was showing my students how to start MySQL. ;-) That’s a great add though. Thanks. Michael


    27 Feb 14 at 1:50 am

  8. I am getting the below error on executing sudo yum install mysql-server

    Error downloading packages:
    mysql-community-libs-5.6.19-1.fc20.x86_64: [Errno 256] No more mirrors to try.


    18 Jun 14 at 12:46 am

  9. Paul, That appears to be a network connectivity issue, but I’ll try to test it next week.


    18 Jun 14 at 10:45 am

Leave a Reply