Koozali.org: home of the SME Server

Mysql on SME 7.0 RC3

Offline maykelsoft

  • *
  • 57
  • +0/-0
    • http://www.esi.com.ph
Mysql on SME 7.0 RC3
« 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

Offline judgej

  • *
  • 375
  • +0/-0
Re: Mysql on SME 7.0 RC3
« Reply #1 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
-- Jason

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Mysql on SME 7.0 RC3
« Reply #2 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.
...

Offline maykelsoft

  • *
  • 57
  • +0/-0
    • http://www.esi.com.ph
Mysql on SME 7.0 RC3
« Reply #3 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

Offline judgej

  • *
  • 375
  • +0/-0
Re: Mysql on SME 7.0 RC3
« Reply #4 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
-- Jason

Offline maykelsoft

  • *
  • 57
  • +0/-0
    • http://www.esi.com.ph
Mysql on SME 7.0 RC3
« Reply #5 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)

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Mysql on SME 7.0 RC3
« Reply #6 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.
...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Mysql on SME 7.0 RC3
« Reply #7 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.
...

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline maykelsoft

  • *
  • 57
  • +0/-0
    • http://www.esi.com.ph
Mysql on SME 7.0 RC3
« Reply #9 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

recoco

Re: Mysql on SME 7.0 RC3
« Reply #10 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.

Offline dsemuk

  • *****
  • 269
  • +0/-0
Re: Mysql on SME 7.0 RC3
« Reply #11 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
--
Esmith/Mitel/SME server  :-D...

recoco

Re: Mysql on SME 7.0 RC3
« Reply #12 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.