In FC6, first time to start MySQL and try to create passwor for root user but failed, I login as root and did the following commands;
[root@localhost mailto:root@localhost ~]#
service mysqld start
Starting MySQL: [OK]
[root@localhost ~]# mysqladmin -u root password mypassword123
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
First time and completely new in MySQL, did I miss something? Need help.
On Sat, 2007-07-28 at 08:52 -0700, Barry Yu wrote:
In FC6, first time to start MySQL and try to create passwor for root user but failed, I login as root and did the following commands;
[root@localhost mailto:root@localhost ~]#
service mysqld start
Starting MySQL: [OK][root@localhost ~]# mysqladmin -u root password mypassword123
I think you need to use -p mypassword123 ^^^^ Regards, Patrick
As I said, this is the first time I started MySQL and never had any password under any user name, I was trying to create a password for user root after initial installation of MySQL as the book said, unless this is out of date and no required any more? Or I have to do something in addition (That book didn't mentioned it) Barry
Patrick wrote:
On Sat, 2007-07-28 at 08:52 -0700, Barry Yu wrote:
In FC6, first time to start MySQL and try to create passwor for root user but failed, I login as root and did the following commands;
[root@localhost mailto:root@localhost ~]#
service mysqld start
Starting MySQL: [OK][root@localhost ~]# mysqladmin -u root password mypassword123
I think you need to use -p mypassword123 ^^^^ Regards, Patrick
Around 05:26pm on Saturday, July 28, 2007 (UK time), Barry Yu scrawled:
As I said, this is the first time I started MySQL and never had any password under any user name, I was trying to create a password for user root after initial installation of MySQL as the book said, unless this is out of date and no required any more? Or I have to do something in addition (That book didn't mentioned it)
I do it a different way, as shown on my webpages here: http://yellowhammer.stevesearle.com/tech/centos5.0.svr.html#mysql
Steve
I tried your link to your webpage but getting "Server not found", your server is down? Barry
Steve Searle wrote:
Around 05:26pm on Saturday, July 28, 2007 (UK time), Barry Yu scrawled:
As I said, this is the first time I started MySQL and never had any password under any user name, I was trying to create a password for user root after initial installation of MySQL as the book said, unless this is out of date and no required any more? Or I have to do something in addition (That book didn't mentioned it)
I do it a different way, as shown on my webpages here: http://yellowhammer.stevesearle.com/tech/centos5.0.svr.html#mysql
Steve
Around 07:53am on Sunday, July 29, 2007 (UK time), Barry Yu scrawled:
I tried your link to your webpage but getting "Server not found", your server is down?
Oops - that was the copy on the local server. Try this: http://www.stevesearle.com/tech/centos5.0.svr.html#mysql
Steve
Steve Searle steve@stevesearle.com wrote: Around 07:53am on Sunday, July 29, 2007 (UK time), Barry Yu scrawled:
I tried your link to your webpage but getting "Server not found", your server is down?
Oops - that was the copy on the local server. Try this: http://www.stevesearle.com/tech/centos5.0.svr.html#mysql
Steve
At 9:19 AM -0700 7/29/07, Barry Yu wrote:
Steve Searle steve@stevesearle.com wrote:
Around 07:53am on Sunday, July 29, 2007 (UK time), Barry Yu scrawled:
I tried your link to your webpage but getting "Server not found", your server is down?
Oops - that was the copy on the local server. Try this: http://www.stevesearle.com/tech/centos5.0.svr.html#mysql
Steve
--
Play Champions - my free football predictions game at: http://www.stevesearle.com/champs/about.html
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Still can't login as root;
[root@localhost ~]# service mysqld start Starting MySQL [OK] [root@localhost ~]# mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
I've been searching with Google and found that I am not alone in this proble but unfortunately there wasn't any solution that I can find helpful to resolve this issue, seems before I set a password for root user (Create one after the initial installation and before using MySQL) there is one existing already and I don't know what it is. I even yum removed MySQL and then yum groupinstall mysql to make sure a fresh installation of MySQL is being used.
I had tried followings; [root@localhost ~]# mysqladmin -u root password -p mypassword123 Enter password: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' [root@localhost ~]# mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) [root@localhost ~]# mysql -u root -p Enter password: (I enter blank RETURN key) ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
To reset the root password without knowing it, start mysqld without using the grant tables:
Per Resetting a forgotten MySQL root password: http://www.debian-administration.org/articles/442 []# service mysqld stop # mysqld must be stopped []# /usr/bin/mysqld_safe --skip-grant-tables & []# mysql -uroot mysql mysql> update user set Password=PASSWORD('new-pw') WHERE User='root'; mysql> quit
Here my instructions are a bit loopy. Probably the PID to kill is the one reported above.
[]# ps -ef | grep mysql []# kill [the second PID] []# fg # so the shell stops too []# service mysqld start
Hands down the fastest way to set a root password for a newly initialized mysql db:
$ mysql -u root set password for root@localhost = password('CHANGEME'); flush privileges; quit;
Now, log on as:
mysql -u root -p
And you will be prompted for the password that you just set.
John Pierce wrote:
Hands down the fastest way to set a root password for a newly initialized mysql db:
$ mysql -u root set password for root@localhost = password('CHANGEME'); flush privileges; quit;
Now, log on as:
mysql -u root -p
And you will be prompted for the password that you just set.
My thanks to all that had been helping Barry
On Sat, 2007-07-28 at 23:53 -0700, Barry Yu wrote:
I tried your link to your webpage but getting "Server not found", your server is down? Barry
Please don't top post. Try going to: http://www.stevesearle.com/tech/centos5.0.svr.html#mysql
Regards, Patrick
Steve Searle wrote:
Around 05:26pm on Saturday, July 28, 2007 (UK time), Barry Yu scrawled:
As I said, this is the first time I started MySQL and never had any password under any user name, I was trying to create a password for user root after initial installation of MySQL as the book said, unless this is out of date and no required any more? Or I have to do something in addition (That book didn't mentioned it)
I do it a different way, as shown on my webpages here: http://yellowhammer.stevesearle.com/tech/centos5.0.svr.html#mysql
Steve
On 7/28/07, Barry Yu barryyu-cts@sbcglobal.net wrote:
As I said, this is the first time I started MySQL and never had any password under any user name, I was trying to create a password for user root after initial installation of MySQL as the book said, unless this is out of date and no required any more? Or I have to do something in addition (That book didn't mentioned it) Barry
As Patrick pointed out, you need the '-p' option before the password: mysqladmin -u USER -p PASSWORD
Webmin is very handy for configuring MySQL - that's generally what I use to set things up.
Chris