Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: simpleone on June 04, 2002, 05:25:07 AM

Title: MYSQL connection
Post by: simpleone on June 04, 2002, 05:25:07 AM
Hi All,

Can someone please tell me how to connect to the MYSQL server, i run E-smith 5.1, at the telnet in and login as root. Yet when i type "mysql" i get the following error

[root@trust /]# mysql
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
[root@trust /]#


?

Can someone help with this please
Title: Re: MYSQL connection
Post by: Dan Brown on June 04, 2002, 05:40:46 AM
Looks like at some point you changed the mysql root password.  Why?
Title: Re: MYSQL connection
Post by: simpleone on June 04, 2002, 06:34:05 AM
Well heres the thing,, from all the reading i have done i would say the same thing. But this is a fresh install of 5.1, login and get that error.

what do i need to do ?
Title: Re: MYSQL connection
Post by: Dan Brown on June 04, 2002, 06:47:07 AM
Well, start by taking a look at /root/.my.cnf.  See if the password in there is the same as the one in /etc/openldap/ldap.pw (it should be).
Title: Re: MYSQL connection
Post by: simpleone on June 04, 2002, 08:14:09 AM
yes there are both the same
Title: Re: MYSQL connection
Post by: simpleone on June 04, 2002, 09:39:13 AM
any other ideas ?
Title: Re: MYSQL connection
Post by: Johan on June 04, 2002, 03:06:18 PM
Hello simpleone,

You can try this:

Login as root and perform the following commands to change the MySQL password and edit /root/.my.cnf

#Login to MySQL and set a new password
[root@server /root]# mysqladmin -u root password new_password

#Edit /root/.my.cnf to edit the password
Open the file /root/.my.cnf with your favorite editor en place the new password after password=.

Good luck

Johan
Title: Re: MYSQL connection
Post by: Dan G. on June 04, 2002, 06:29:15 PM
I suggest you force a re-sync of you ldap and mysql passwords the genuine SME way, thus:

# /etc/rc.d/init.d/mysqld stop
# /etc/e-smith/events/actions/conf-mysql-password
# /etc/rc.d/init.d/mysqld start
Title: Re: MYSQL connection
Post by: simpleone on June 05, 2002, 06:21:41 AM
Thanks Dan, that worked