Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: maykelsoft on June 27, 2006, 07:52:22 AM

Title: Mysql on SME 7.0 RC3
Post by: maykelsoft on June 27, 2006, 07:52:22 AM
How can I restore the mysql root default password?

I got this error:
Access denied for user 'root'@'localhost' (using password: YES)

Please help.

Thanks,

Mike
Title: Re: Mysql on SME 7.0 RC3
Post by: judgej on June 27, 2006, 10:37:11 AM
Quote from: "maykelsoft"
How can I restore the mysql root default password?


I would recommend that you don't. Leave the root password well alone, as it is hard-coded in a number of different places.

If you want to create and manage your own databases, then log in as root and create a  new user with all the relevant privileges. Use that new user exclusively.

-- JJ
Title: Re: Mysql on SME 7.0 RC3
Post by: raem on June 27, 2006, 11:54:19 AM
maykelsoft

> How can I restore the mysql root default password?

Darrell May has a howto in his contrib area which I think is still applicable.
Title: Mysql on SME 7.0 RC3
Post by: maykelsoft on June 27, 2006, 12:31:12 PM
Where can I get that howto?

When using mysql I got this error:
[root@server]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Thanks,

Mike
Title: Re: Mysql on SME 7.0 RC3
Post by: judgej on June 27, 2006, 12:40:38 PM
Quote from: "maykelsoft"
Where can I get that howto?

When using mysql I got this error:
[root@server]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


Are you sure you want to reset the mysql root password? Is everything else working? If so, best not to touch the root password.

The file '.my.cnf' in the root home directory contains the password that the shell root user will use to log in to mysql. Try expanding that template and see if it makes a difference:

/sbin/e-smith/expand-template /root/.my.cnf

You did not say how your password got changed. Was it like like after an install? After an update? Or have you been changing it?

-- JJ
Title: Mysql on SME 7.0 RC3
Post by: maykelsoft on June 27, 2006, 01:25:43 PM
Got same error... when issuing command mysql

[root@server ~]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Title: Re: Mysql on SME 7.0 RC3
Post by: raem on June 27, 2006, 06:38:49 PM
maykelsoft

> Where can I get that howto?

The Contribs link at the left is a good place to start, then click the link for Users Contrib Directories which should take you to
http://mirror.contribs.org/smeserver//contribs/

Look in dmay, although I have just looked myself and cannot find it there.
I'm sure there used to be a howto for resetting the mysql password to the default, for those naughty people who change it and should not have changed it.
You may have to search the wayback machine web site, unless someone else can provide a link.
Title: Re: Mysql on SME 7.0 RC3
Post by: raem on June 27, 2006, 06:47:30 PM
maykelsoft

I think the howto I referred to has been deprecated, that's probably why it was removed. Charlie Brady answered this a while ago so search these forums on mysql and you will find the answer.
Title: Mysql on SME 7.0 RC3
Post by: chris burnat on June 28, 2006, 12:19:29 AM
http://bugs.contribs.org/show_bug.cgi?id=399
http://bugs.contribs.org/show_bug.cgi?id=778
Hope it helps...
Title: Mysql on SME 7.0 RC3
Post by: maykelsoft on June 28, 2006, 04:23:19 AM
Its working now... thanks for all your reply...

Solve by issuing this commad:
# cd cd /service/mysqld
# runsvctrl d .
# /usr/libexec/mysqld --bootstrap --user=mysql  --skip-grant-tables < ./set.password
# runsvctrl u .

Thanks...

Mike
Title: Re: Mysql on SME 7.0 RC3
Post by: recoco on June 28, 2006, 04:41:26 AM
Quote from: "judgej"
Quote from: "maykelsoft"
How can I restore the mysql root default password?



If you want to create and manage your own databases, then log in as root and create a  new user with all the relevant privileges. Use that new user exclusively.

-- JJ


hi,sir.What is the root's default password?I did'nt remerber i had set that on install process.
Title: Re: Mysql on SME 7.0 RC3
Post by: dsemuk on June 28, 2006, 07:12:36 PM
Quote from: "recoco"
hi,sir.What is the root's default password?I did'nt remerber i had set that on install process.


It is a random (74 character)? string generated during the install process.

You cannot simply copy the password from another server.

Dave
Title: Re: Mysql on SME 7.0 RC3
Post by: recoco on June 29, 2006, 06:25:22 AM
Quote from: "dsemuk"
Quote from: "recoco"
hi,sir.What is the root's default password?I did'nt remerber i had set that on install process.


It is a random (74 character)? string generated during the install process.

You cannot simply copy the password from another server.

Dave


found it.It is in root's home dir.filename is .my.cnf.