- Use
yum to install both mysql command line tool and the server:yum -y install mysql mysql-server
- Enable the MySQL service:
/sbin/chkconfig mysqld on
- Start the MySQL server:
/sbin/service mysqld start
- Set the MySQL root password:
mysqladmin -u root password 'new-password'The quotes around the new password are required.
Like this:
Like Loading...
This entry was posted on January 21, 2008 at 4:01 am and is filed under Programming. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
May 15, 2008 at 2:05 am |
Thank you !
March 16, 2009 at 9:55 pm |
You’re welcome. Glad it was useful.
June 16, 2008 at 8:00 pm |
yes thanks for the note
July 4, 2008 at 3:43 am |
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
September 4, 2009 at 11:33 am |
i’m also having the same problem…… how to resolve
how to start mysql
Access denied for user ‘root’@'localhost’ (using password: NO)
March 31, 2010 at 4:55 am |
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)
July 25, 2008 at 2:20 pm |
Thanks… it worked…
July 27, 2008 at 1:20 pm |
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.
August 23, 2008 at 9:17 pm |
Thanks a lot.
It works.
August 28, 2008 at 10:50 pm |
Thank you.
August 30, 2008 at 5:16 pm |
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 ==
October 7, 2008 at 3:44 am |
Thanks a lot. It worked
October 24, 2008 at 6:54 am |
Hey thanks , it worked for
October 29, 2008 at 10:01 am |
Thank a lot …… it worked without any interreputions…
October 29, 2008 at 12:45 pm |
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 ?
November 7, 2008 at 4:07 pm |
@Ross/jonathan
you need to run as root?
November 26, 2008 at 3:19 am |
Thank You
December 7, 2008 at 4:51 am |
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.
December 9, 2008 at 3:18 pm |
Thanku sooooooo much….
December 20, 2008 at 8:47 am |
Hi,
Very Simple and more perfect…It’s very useful.Thanks a lot….
December 21, 2008 at 7:35 pm |
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…
December 30, 2008 at 5:31 pm |
thanks!
this is BY FAR the easiest way to install mysql ive found….
March 16, 2009 at 9:50 pm |
That worked perfectly! Thank you!
August 14, 2009 at 11:24 am |
thanks…………
August 21, 2009 at 4:27 am |
Excellent…thanks for the info…
September 4, 2009 at 11:35 am |
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
October 31, 2009 at 12:43 pm |
It works perfectly! (F10)
Thanks, dude.
December 3, 2009 at 3:38 pm |
pls can any tell me how to start using this server…
(i.e., how to get into its command console)
December 4, 2009 at 6:34 pm |
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.
January 21, 2010 at 1:18 am |
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.
February 4, 2010 at 2:19 am |
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. “
May 18, 2010 at 7:56 pm |
Brilliant work! thank you
June 2, 2010 at 5:08 pm |
Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
July 15, 2010 at 9:08 am |
thanks sir
February 11, 2011 at 2:35 am |
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.”
September 16, 2011 at 8:29 am |
Hi Shahram,
Thanks million….your tutorial is almost three years old but it’s still really helpful.
September 16, 2011 at 4:57 pm |
Hey glad to hear that it helped. Thank you for the feedback.
November 2, 2011 at 9:20 pm |
hi , can any one tell me how to remove root password?
January 7, 2012 at 1:03 pm |
free Browser games…
[...]How to install MySQL on fedora « n o t e 1 9 . c o m[...]…
February 2, 2012 at 7:47 am |
Thanks alot…it took me less than 5 minutes to do it
February 8, 2012 at 7:44 am |
browsergame…
[...]How to install MySQL on fedora « n o t e 1 9 . c o m[...]…
March 12, 2012 at 7:07 pm |
go to my pc login…
[...]How to install MySQL on fedora « n o t e 1 9 . c o m[...]…
May 23, 2012 at 8:00 am |
Thank’s a lot it was perfect …
February 9, 2013 at 9:40 am |
within few min installed mysql..Thanks a lot