Okay...found the answer to this one.

The way to do it seems to be :-

1) Kill all mysqld processes.
2) Restart with safe-mysqld -Sg - this allows anyone to access the db without 
a password.
3) Add a password for user "root" by doing :-
shell> mysql -u root mysql
mysql> UPDATE user SET 
Password=PASSWORD('new_password')
WHERE user='root';

Thanks,
Mark.

>===== Original Message From [EMAIL PROTECTED] =====
>...but whenever I try any of these commands I get the access denied message!
>
>Which sees to fit......user root is not allowed to access the
>database....therefore you cannot do "mysql anything".
>
>This is driving my nuts......another fine example that free software is the
>very most expensive!
>
>Thanks,
>Mark.
>
>>===== Original Message From "Gordon Pearce"
><[EMAIL PROTECTED]> =====
>>> Thanks for all the replies to this.
>>>
>>> I have so far figured that the root user cannot connect to the database.
>>> So I need to set a password for the root user, right?
>>
>>Yep...
>>
>>> However, the root user cannot connect to the database to dp this.
>>
>>They ought to be able to...
>>
>>> Whenever I give the command "mysqldadmin -u root password fred", I get the
>>> following message :-
>>> mysqladmin: connect to server at 'localhost' failed
>>> error: 'Access denied for user: 'root@localhost' (Using password: NO)'
>>
>>Try -p instead of password.  Or try:
>>mysql -p <password>
>>Of course, if there's no password set, just do:
>>mysql -u root
>>then set a password on the mysql user database...
>>
>>
>>
>>--------------------------------------------------------------------
>>http://www.lug.org.uk                   http://www.linuxportal.co.uk
>>http://www.linuxjob.co.uk               http://www.linuxshop.co.uk
>>--------------------------------------------------------------------
>
>Totalise - the Users ISP
>----------------------
>To become a member and a shareholder
>visit http://www.totalise.net
>
>-----------------------
>The Totalise Email system, probably the most flexible email system in the
>world. To register for an account goto http://www.totalise.net
>
>--------------------------------------------------------------------
>http://www.lug.org.uk                   http://www.linuxportal.co.uk
>http://www.linuxjob.co.uk               http://www.linuxshop.co.uk
>--------------------------------------------------------------------

Totalise - the Users ISP
----------------------
To become a member and a shareholder
visit http://www.totalise.net

-----------------------
The Totalise Email system, probably the most flexible email system in the
world. To register for an account goto http://www.totalise.net


--------------------------------------------------------------------
http://www.lug.org.uk                   http://www.linuxportal.co.uk
http://www.linuxjob.co.uk               http://www.linuxshop.co.uk
--------------------------------------------------------------------

Reply via email to