[Gllug] problems with mysql database access

Alistair Mann alistair at lgeezer.net
Mon Jun 2 20:29:35 UTC 2003


-----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.

Next, can I suggest you obtain some version numbers of the software concerned? 
You may even like to check via google just in case those versions and that 
error has been seen before.

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.

Cheers,
- -- 
Alistair Mann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+27OvEz+/jt85AfsRAjvWAJwKWZkVkNdKa2bwfGirliQtNW79IACbB7cR
tL8ZQZBm8Rte5pQyl5LyPm8=
=diD7
-----END PGP SIGNATURE-----



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




More information about the GLLUG mailing list