[Gllug] problems with mysql database access

Sean Burlington sean at uncertainty.org.uk
Mon Jun 2 21:48:49 UTC 2003


Alistair Mann wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Thus spaketh Sean Burlington on Monday 02 June 2003 6:51 pm:
> 
>>Hi All,
>>	I came back from holiday -> apt-get upgraded my system (debian testing)
>>and now php/mysql won't play nice
>>
>>command line works fine
>>
>>mysql -uschool -pbonfire school
>>
>>BUT
>>
>><?php
>>     /* Connecting, selecting database */
>>     $link = mysql_connect("localhost", "school", "bonfire")
>>         or die("Could not connect : " . mysql_error());
>>     print "Connected successfully";
>>     mysql_select_db("school") or die("Could not select database".
>>mysql_error());
>>
>>?>
>>
>>results in the following error
>>
>>Connected successfully
>>Could not select databaseAccess denied for user: '@localhost' to
>>database 'school'
>>
>>the logfile shows this ...
>>
>>030602 18:47:01      33 Connect     sean at localhost as anonymous on
>>                      33 Init DB     Access denied for user:
>>'@localhost' to database 'school'
>>                      33 Quit
>>
>>
>>Any ideas why the connection is being made as anonymous instead of with
>>the details supplied ???
>>
>>I'm at the hair pulling stage ... and have a more confused system having
>>tried uninstalling / re-installing things - seems like Debian doesn't
>>like you to delete config files (RH never seemed to mind)
> 
> 
> Can I first suggest that you don't use automated upgrades? Things go wrong 
> when people lose track of what has been upgraded, where, and more 
> importantly, why.
> 

you can suggest it

- depends what you mean by automatic

I instigated the upgrade

don't need to know *all* the details as to what and why

maybe I should have paid more attention though ...

> Next, can I suggest you obtain some version numbers of the software concerned? 


Package: mysql-server
Version: 3.23.49-8

Package: php4-mysql
Version: 4:4.1.2-6
Depends: libc6 (>= 2.2.4-4), libmysqlclient10, zlib1g (>= 1:1.1.4),

Package: php4
Version: 4:4.1.2-5

Package: libmysqlclient10
Version: 3.23.49-8



> You may even like to check via google just in case those versions and that 
> error has been seen before.

google is by now getting fed up with me

(I was bored of google a while ago)

> 
> A priori, it would seem that your mysql permissions relating to which user can 
> access which database have been modified or corrupted; that is, the 'db' 
> table in the 'mysql' database. Try your backup copy of the database from 
> before the upgrade. Even better, roll back the upgrade.

mysql permissions seem to be OK on the command line

specific instructons as to how to roll back a debian upgrade much 
appreciated

(for academic reasons similar instructions for RH also apreciated)

cheers for the response

-- 

Sean





-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list