Koozali.org: home of the SME Server

can't connect as user to mysql

Roy

can't connect as user to mysql
« on: December 25, 2003, 05:24:47 PM »
Dear folks,

I have a simple problem but I don't know how to solve it.
E-smith is running fine, everything is working. I can modify everything except mysql. when trying to log in ( via shell) I get the errorcode:

----------------------------------------
Server localhost
Error

MySQL returned:

#1045 - Access denied for user: 'root@localhost' (Using password: YES)
[Documentatie]
----------------------------------------

Not only with root I get this. When trying every form of username the errorcode still comes back. How can I log in?

I use
"cd mysqlmap/bin
mysql -u user -p"

When I know how to get in phpMyAdmin should also work. Now it doesn't.

Help...

Roy van Lieshout ( The Netherlands)

makaio

Re: can't connect as user to mysql
« Reply #1 on: December 26, 2003, 06:22:27 PM »
Roy,
Did you change the root password via:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('secret_password');

I've run into this in the past.  I've made the same mistake several times. There is no reason to change the root password.  The default MySQL root password is a 76-character random string, and is synchronized with the default LDAP password.  It is different for every system, so there is no security impact from leaving this password at the default.  The system occasionally needs to make database changes, and it relies on the password remaining at the default to make those changes.

Try resetting the MySQL root password like this:

[root@e-smith /root] # /etc/rc.d/init.d/mysqld stop
[root@e-smith /root] # /etc/e-smith/events/actions/conf-mysql-password
[root@e-smith /root] # /etc/rc.d/init.d/mysqld start

szmike168

Re: can't connect as user to mysql
« Reply #2 on: January 05, 2004, 03:23:59 PM »
Sorry, I am new !
May I ask a stupid question, where can I find the MySQL's password!!!
Thanks a lot !

MasterSleepy

Re: can't connect as user to mysql
« Reply #3 on: January 05, 2004, 03:53:27 PM »
Hello,

If you are connect to the console with root.
You only have to type :
mysql -u root
And you are connected to mysql

Regards,
MasterSleepy
http://vanhees.homeip.net

Gregory Baird

Re: can't connect as user to mysql
« Reply #4 on: January 05, 2004, 05:03:02 PM »
Hello

search this forum in version sme 6.0 you have to "turn on" local networking if you are working from within your network

if you are connecting from the server console you should be able to login as root no password or from the mysql prompt just add a user of your choice with all rights check to link below

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Adding_users

Greg

Gregory Baird

Re: can't connect as user to mysql
« Reply #5 on: January 05, 2004, 05:05:41 PM »
Also take a look at the link below
easy to setup and use php-web based administration of mysql

http://forums.contribs.org/index.php?topic=9358.msg35680#msg35680

hope some of this info helps

Greg