Mailinglist Archive: opensuse (4343 mails)

< Previous Next >
Re: [SLE] mysql root permission denied
  • From: poeml@xxxxxxxxxxx
  • Date: Thu, 7 Nov 2002 16:03:21 +0100
  • Message-id: <20021107160321.C5267@xxxxxxxxxxx>
On Thu, Nov 07, 2002 at 10:36:24AM +0000, steve wrote:
> Hi everyone. After a clean 8.1 install I do:
> mysql_install_db
> (no errors)

Did you do
mysql_install_db --user mysql

Anyway, you shouldn't have done it in the first place since the init
script /etc/init.d/mysql does that for you when you start it for the
first time (rcmysql start).

I don't know but there is a remote possibility that if you did things by
hand you missed a step or did it in a different way than the system
expects it. Starting mysql by the init script is all you need to do to
get it running (and set the admin password as the init script tells you.

BTW, a correct way to _initially_ set the password (i.e. while there
is an empty password) is:

/usr/bin/mysqladmin -u root password 'secret'

After that, you need to use

/usr/bin/mysqladmin -u root -p password 'anotherpassword'

if you want to change it, and enter the current password on the tty.
Everything else will give you the 'Access denied for user:
'root@localhost' message.

< Previous Next >
Follow Ups