How to install MySQL on fedora


  1. Use yum to install both mysql command line tool and the server:yum -y install mysql mysql-server
  2. Enable the MySQL service:/sbin/chkconfig mysqld on
  3. Start the MySQL server:/sbin/service mysqld start
  4. Set the MySQL root password:mysqladmin -u root password 'new-password'The quotes around the new password are required.

44 Responses to “How to install MySQL on fedora”

  1. David Fabrycky Says:

    Thank you !

  2. Eric Shing Says:

    yes thanks for the note

  3. Ruzaik Refai Says:

    I’m running Fedora core. When I tried the above I got the following error.

    [root@localhost ruzaik]# yum -y install mysql mysql-server
    Loading “installonlyn” plugin
    Setting up Install Process
    Setting up repositories
    Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=core-6&arch=i386 error was
    [Errno 4] IOError:
    Error: Cannot find a valid baseurl for repo: core

    • deepak Says:

      i’m also having the same problem…… how to resolve

      how to start mysql

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

    • RASHMI Says:

      WHN U INSTALL THE MYSQL USING THIS
      ALL ABOVE STEPS

      AND DO
      mysql -u root -p

      IT WILL ASK THE PASSWORD
      if u havnt set any password just press enter

      u will be inside ur mysql data base

      eample:
      [root@localhost mpich2-1.2.1p1]# mysql -u root -p
      Enter password:

      Welcome to the MySQL monitor. Commands end with ; or \g.
      Your MySQL connection id is 6
      Server version: 5.0.88 Source distribution

      Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

      mysql> show DATABASES;
      +——————–+
      | Database |
      +——————–+
      | information_schema |
      | mysql |
      | test |
      +——————–+
      3 rows in set (0.00 sec)

  4. Tasin Reza Says:

    Thanks… it worked…

  5. Andrew Says:

    running

    /usr/bin/mysql_secure_installation

    at the end is much more secure (instead of the password setting). it will guide you through a few more steps of removing anonymous users etc.

  6. Nishith Says:

    Thanks a lot.

    It works.

  7. Randy Says:

    Thank you.

  8. ross lambert Says:

    Wow, I’m really stuck. I installed Fedora 9, then followed the steps above but I get this error:

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

    It was a fresh install, so I had not yet set a password for root.

    Any ideas? I have uninstalled/reinstalled MySql three times now. Every time I get the same result.

    == Ross ==

  9. Sanka Says:

    Thanks a lot. It worked

  10. Veerendra Says:

    Hey thanks , it worked for :)

  11. jaswanth Says:

    Thank a lot …… it worked without any interreputions…

  12. jonathan Says:

    Hello Ross, I am facing the same issue on fedora 9, already wasted half a day now trying to figure out why it is asking me a password after a fresh install….anyone knows how to fix this ?

  13. FishCake!!! Says:

    @Ross/jonathan

    you need to run as root?

  14. ahmed Says:

    Thank You

  15. samir Says:

    I am having the same password issue on the initial install
    i removed mysql and mysql-server using YUM
    I manually removed all the directories referenced in webmin
    ran everything as root (su)
    Reinstalled and still nothing.
    There has to be a reason why this failed for me.

  16. Harsha Says:

    Thanku sooooooo much….

  17. jemima Says:

    Hi,

    Very Simple and more perfect…It’s very useful.Thanks a lot….

  18. darryl west Says:

    for fedora 9, I ran into the same password problem. I was able to reset by by doing this:

    mysqld_safe –skip-grant-tables

    then, manually insert a root user and all the privs. then, I ran:

    /usr/bin/mysql_secure_installation

    that did the trick…

  19. luke Says:

    thanks!
    this is BY FAR the easiest way to install mysql ive found….

  20. Alex Says:

    That worked perfectly! Thank you!

  21. amit Says:

    thanks…………

  22. Balachandar Says:

    Excellent…thanks for the info…

  23. deepak Says:

    while starting mysql ….i’m getting

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

    how to resolve

    i’ve used … >>> /usr/bin/mysql_secure_installation

  24. Lino Says:

    It works perfectly! (F10)
    Thanks, dude.

  25. venkatesh Says:

    pls can any tell me how to start using this server…
    (i.e., how to get into its command console)

    • Shahram Javey Says:

      I dont have access to a Linux system now. But on the Mac, I use two aliases to manually start and stop mysql. This works fine in a development setup.

      alias mysqlstart='sudo /opt/local/bin/mysqld_safe5 --user=mysql&'
      alias mysqlstop='sudo /opt/local/bin/mysqladmin5 -u root -p shutdown'
      
  26. Serkan Says:

    Hello, I am having the same problem as “deepak” and “ross”

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

    It was a fresh install, i already set a password for root user

    Any ideas? I have uninstalled/reinstalled MySql three times now. Every time I get the same result.

  27. Darren Says:

    Thanks, great tutorial. Had same problem as @deepak, @ross, @Serkan. Found the solution after some searching, ripped this off of a forum, hope this helps:

    “It indicates that root has a password, but you are not supplying it, hence the (Using password: NO)

    try using mysql -u root -p

    The -p will make it prompt you for a password. “

  28. lax Says:

    Brilliant work! thank you

  29. raj Says:

    Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

  30. ivtidai Says:

    thanks sir

  31. fahmi Says:

    I have problem using fedora 12..after i do yum, error is “cannot retrieve repositary metadata (repomd.xml) for repositary:fedora. please verify its path and try again.”

  32. Alex Says:

    Hi Shahram,
    Thanks million….your tutorial is almost three years old but it’s still really helpful.

  33. sandeep Says:

    hi , can any one tell me how to remove root password?

  34. free Browser games Says:

    free Browser games…

    [...]How to install MySQL on fedora « n o t e 1 9 . c o m[...]…

  35. lucy Says:

    Thanks alot…it took me less than 5 minutes to do it

  36. browsergame Says:

    browsergame…

    [...]How to install MySQL on fedora « n o t e 1 9 . c o m[...]…

  37. go to my pc login Says:

    go to my pc login…

    [...]How to install MySQL on fedora « n o t e 1 9 . c o m[...]…

  38. Bledi Kasa Says:

    Thank’s a lot it was perfect …

  39. maddy Says:

    within few min installed mysql..Thanks a lot :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: