[Refdb-users] could not connect to database server
Status: Beta
Brought to you by:
mhoenicka
|
From: Markus H. <hoe...@co...> - 2002-03-07 04:22:55
|
Hi, I think you both stumble over an oddity of the MySQL security system. If you allow access to a database from everywhere (%) this does not include access from localhost. You need a separate entry in the appropriate table to allow access from localhost. So e.g. if you manage your users through the (somewhat rudimentrary) refdba adduser command, you'd need two separate commands for each database, one using "%" (or a subnet or something) to allow remote access, and one using "localhost" to allow local access. And to be able to do this in the first place, your MySQL administrator account also needs two entries in the MySQL user table. You have to use the mysql client to do this manually. This at least works with MySQL running on Debian stable. I specify 127.0.0.1 as the IP address of mysqld in my refdbd config file, so I don't have to use the name of the external net interface. If this behaviour has changed in recent versions of MySQL, I'd finally have to upgrade and see what needs to be changed. regards, Markus Juan de la Figuera writes: > > Hi, > > I had the same problem with 8.2 (have not tried 8.3 yet, lets see this > weekend in a new ibook :-)). Also using Debian/unstable. > > For some reason, it didn't want to connect to the mysql locally. It > worked when I enabled mysql network administration (yeah, I am not > supposed to do it, but I am behind a firewall), and told refdba/c to > call mysql remotely (NOT using localhost, but the proper name of the > computer in /etc/hosts, even from the same computer). Of course, then > I had to set up the proper permissions for the mysql database... I > blamed it before on my ignorance of mysql/refdb. Somehow refdb tried > to use unix sockets, and mysql didn't like it... > > Juan > > > Subject: [Refdb-users] could not connect to database server > > > > I get "could not connect to server" errors when I try to run commands in > > refdba. I can access refdba (get to the refdba prompt) regardless of the > > password or user name I use. Whatever user I log in as, including the > > mysql root user, I get the "could not connect to server" message when I > > try to run a command such as listdb or createdb. Can anyone help with > > this? > > -- > > ---------------------------------------- > Juan de La Figuera > Sandia National Laboratories > Mail Stop 9161 > Livermore, CA 94550 > > Fax: 925-294-3231 > Phone: 925-294-1201 > e-mail: gap...@at... > ju...@ca... > jd...@sa... > Web: http://www.ca.sandia.gov/materials_science > http://castelar.dhs.org > ---------------------------------------- > > _______________________________________________ > Refdb-users mailing list > Ref...@li... > https://lists.sourceforge.net/lists/listinfo/refdb-users -- Markus Hoenicka hoe...@co... http://ourworld.compuserve.com/homepages/hoenicka_markus/ |