Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Ed on June 04, 2003, 01:07:35 AM

Title: Mysql problems
Post by: Ed on June 04, 2003, 01:07:35 AM
Just upgraded to SME 5.6 unsupported. Updated to glibc-common-2.2.5-43.i386.rpm and glibc-2.2.5-43.i386.rpm.

Using phpMyAdmin I get the following error:
Error
MySQL said: Access denied for user: 'root@localhost' (Using password: YES)

If I try to go to the phpBB Forum Admin page I get the following error:

An Error Occured
--------------------------------------------------------------------------------
phpBB was unable to connect to the database.
Please check $dbhost, $dbuser, and $dbpasswd in config.php.

I also cannot connect using Navicat ... I think its a password issue??
Is there somewhere I can change this?
Title: Re: Mysql problems
Post by: Craig Jensen on June 04, 2003, 01:13:56 AM
Your root password may have been changed.  Search the forums for 'resetting root password'.

Also: http://www.mysql.com/doc/en/Resetting_permissions.html

Regards

Craig Jensen
Title: Re: Mysql problems
Post by: Ed Burgstaler on June 04, 2003, 09:38:59 AM
Thanks for your help Craig ... that fixed it. :)
Title: Re: Mysql problems
Post by: Ed Burgstaler on June 04, 2003, 09:48:37 AM
Forgot to mention though that my GUI administration Navicat still cannot connect to Mysql database although everything else seems fine now. Still says cannot connect to host ... it will not accept the root username and password for Mysql.
Title: Re: Mysql problems
Post by: Dan Brown on June 04, 2003, 05:24:13 PM
Are you sure you're using the _mysql_ root password?  For more info, see http://www.familybrown.org/howtos/mysql-password-howto.html.
Title: Re: Mysql problems
Post by: IDar on June 05, 2003, 01:18:36 AM
I have updated both glibc-common and glibc but for mistake i downloaded the RH9  files instead of the update ones... :( and naw i can't neither use my mail server nor use my server correctly...

I can't or I don't know how to make a rollback or install the right type of RPM's...
¿what can I do?
Title: Re: Mysql problems
Post by: IDar on June 05, 2003, 02:09:06 AM
When i try to install the RPM's i get:

[root@localhost]#  rpm -Uvh --replacepkgs  glibc-2.3.2-27.9.i386.rpm glibc-common-2.3.2-27.9.i386.rpm
Preparing...                ########################################### [100%]
Segmentation fault
Title: Re: Mysql problems
Post by: Ed Burgstaler on June 05, 2003, 10:10:54 AM
PhpMyAdmin works fine but I want to use Navicat and I cannot seem to get it working. If I use your suggestion Dan, I am then locked out of everything and phpmyadmin no longer works nor does forum access. Though I am then able to logon to mysql from the localhost.
I end up having to set the password for root back to what it was previously to get everything working again exept here are the results when I type mysql at the server:

Welcome to the Mitel Networks SME Server.
[root@mail root]# mysql
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
[root@mail root]#
 
Any other ideas as to why Navicat doesn't work? Thanks
Title: Re: Mysql problems
Post by: Dan Brown on June 05, 2003, 06:01:03 PM
...then it sounds like you've changed the mysql root password, and then set the changed (i.e., wrong) password in some of your other apps.  Your forum shouldn't be using root at all.

What do you mean by "locked out of everything"?
Title: Re: Mysql problems
Post by: Ed on June 05, 2003, 07:07:01 PM
Well what I mean is that if I follow your instructions to change thr root password in Mysql then I am able to just type Mysql and I can list the databases.
The problem is that I can no longer access Phpmyadmin or the forum I have set up and even so Navicat still cannot connect to Mysql from my XP workstation even though I am using root with new password to logon. It just states "cannot connect".
So I go back and change the Mysql password for root back to what it was before and then I can no longer just type Mysql at the server prompt to access databases and low and behold I am now able to access my forum administration and Phpmyadmin.
Does any of this make sense?
Title: Re: Mysql problems
Post by: Dan Brown on June 05, 2003, 07:30:35 PM
Yes, it makes perfect sense.  You changed the mysql root password (which you shouldn't have done for the reasons I previously outlined), and then used the root user and changed password when you set up phpmyadmin (which you needed to do) and your forum (which you shouldn't have done; the forum doesn't need root access).

What you should do is:

1.  Reset the mysql root password as described in my HOWTO.

2.  Change the phpmyadmin config to use the new mysql root password.

3.  Change the phpbb config to use a completely different user and password--there's no need to use root for this application, and if a security vulnerability in phpbb were to allow the config files to be read, using root would compromise that name and password, exposing your whole database rather than just one set of tables.

Now, as far as Navicat, I've never used it and don't know much (read: anything other than what I see in about 30 seconds on their web site) about it, but I don't think the mysql root user allows remote access by default.  This could be your problem.
Title: Re: Mysql problems
Post by: Ed on June 05, 2003, 08:42:23 PM
That makes a lot more sense now ... btw where is the phpmyadmin config file located? Thanks for all your help Dan....
Title: Re: Mysql problems
Post by: Dan Brown on June 05, 2003, 09:17:52 PM
Well, it's located wherever you installed phpmyadmin.  If you installed it as an RPM, do

rpm -ql name-of-rpm | grep config.inc.php

to find out where it is.
Title: Re: Mysql problems
Post by: Ed Burgstaler on June 06, 2003, 10:28:24 AM
I cannot find the Mysql password in the my.cnf file all that is stated is user=mysql
Title: Re: Mysql problems
Post by: Dan Brown on June 06, 2003, 05:01:42 PM
...and you're sure you're looking at /root/.my.cnf?  It sounds like you're looking at /etc/my.cnf instead.
Title: Re: Mysql problems
Post by: Ed on June 07, 2003, 01:02:01 AM
I'm sure that I don't have that file in /root/.my.cnf but I do have it in /etc/my.cnf  so where did it go from root and how do I get it back?
Title: Re: Mysql problems
Post by: Dan Brown on June 07, 2003, 01:08:32 AM
The conf-mysql-password action should rebuild /root/.my.cnf.  However, it's a hidden file (as are all files with a period in front of their names in *nix OSs).  Do ls -a in /root; I'll bet you'll find the file.
Title: Re: Mysql problems
Post by: Ed on June 07, 2003, 01:19:32 AM
Thanks again Dan ... you're right again.