[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: myqsl dummy needs help



On Monday 16 February 2009, Robert L Cochran wrote:
>That is to say, on the initial installation of a MySQL server, there is
>indeed a 'root'@'localhost' account, but it has no password. See page
>609 of MySQL, Third Edition, by Paul DuBois and read through the next
>several pages.
>
>I just did this for a new MySQL installation on one of my test boxes and
>was able to set the root password with only a little fussiness from
>mysqladmin. I first set the password for localhost, 

There is no localhost in my /etc/passwd file, do I need to adduser first?

>then logged into the 
>mysql server as 'root'@'localhost' and set the password for
>'root'@'my.box.name'. You need to set both these passwords for root.
>Then I tested my login and did a few easy queries such as 'show
>databases;' and I was all set.
>
>Bob
>
>Robert L Cochran wrote:
>> There is a 'root'@'localhost' account, but it has no password. For more
>> information see the MySQL knowledgebase at www.mysql.com.
>>
>> Been there, done that.
>>
>> Bob
>>
>> Craig White wrote:
>>> On Mon, 2009-02-16 at 11:06 -0500, Robert L Cochran wrote:
>>>> All the heavier-weight database engines have their own user accounts, so
>>>> they can grant or restrict permissions to various databases and tables
>>>> based on who the user is. MySQL does this. Even though mysql has a root
>>>> user that user is totally separate from the OS root account. You can
>>>> also have a mysql user account named mickey even though your host box
>>>> does not have such a user. So think only in terms of the defined MySQL
>>>> users.
>>>>
>>>> You need to reset the MySQL root user password.
>>>>
>>>> There may be no password to start with. I wonder what happens if you
>>>> just press enter when prompted for the password. If there is no
>>>> password, then you can set one using mysqladmin. When you first start
>>>> the mysqld server using 'service start mysqld' the syntax of the command
>>>> is explained to you right on the terminal window.
>>>>
>>>> One more point. If you want to assign a password to a user on a specific
>>>> host machine, such as 'mickey'@'mickeymouse.m1.org' then I believe that
>>>> at the time someone attempts to log in with that username the actual
>>>> machine name must resolve correctly on dns to 'mickeymouse.m1.org' or
>>>> the user 'mickey' must have a password defined for the localhost machine
>>>> ('mickey'@'localhost').
>>>>
>>>> To do reset the root password correctly, you can find copious details on
>>>> the MySQL knowledgebase. Go to www.mysql.com and search off their
>>>> knowledgebase. There is a method described for changing the password for
>>>> the root user, but it is fairly complicated. I've used it successfully
>>>> once or twice before when I made a mess of my own mysql root password.
>>>>
>>>> Another great resource is to read Paul DuBois book "MySQL". It is really
>>>> the bible of all things MySQL. If you intend to use MySQL seriously then
>>>> this book is mandatory purchasing and reading.
>>>
>>> ----
>>> I think original setup for mysql is for root user via local socket and
>>> not via localhost so there actually isn't an account for root localhost
>>> thus attempting to connect via tcp/ip as root is doomed to fail out of
>>> the box.
>>>
>>> Craig



-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Would you *______really* want to get on a non-stop flight?
		-- George Carlin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]