Koozali.org: home of the SME Server

MYSQL connection

simpleone

MYSQL connection
« 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

Dan Brown

Re: MYSQL connection
« Reply #1 on: June 04, 2002, 05:40:46 AM »
Looks like at some point you changed the mysql root password.  Why?

simpleone

Re: MYSQL connection
« Reply #2 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 ?

Dan Brown

Re: MYSQL connection
« Reply #3 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).

simpleone

Re: MYSQL connection
« Reply #4 on: June 04, 2002, 08:14:09 AM »
yes there are both the same

simpleone

Re: MYSQL connection
« Reply #5 on: June 04, 2002, 09:39:13 AM »
any other ideas ?

Johan

Re: MYSQL connection
« Reply #6 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

Dan G.

Re: MYSQL connection
« Reply #7 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

simpleone

Re: MYSQL connection
« Reply #8 on: June 05, 2002, 06:21:41 AM »
Thanks Dan, that worked