Re: Accessing MySQL on another machine w/ DBI.pm

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 17:31:00 von Christopher Hicks

On Wed, 26 Mar 2003, Hal Vaughan wrote:
> I even re-started MySQL afterward (I noticed the
> first time I added myself as a user to those tables I had to restart for it
> to take effect).

You will probably get better luck using the grant command. It doesn't
require MySQL to restart and it doesn't require you to understand the
intricacies of how MySQL manages those tables.

grant all on db.* to youruser@192.168.1.2 identified by 'password';

IIRC

--


The death of democracy is not likely to be an assassination from ambush. It
will be a slow extinction from apathy, indifference, and undernourishment.
-Robert Maynard Hutchins, educator (1899-1977)



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 18:15:34 von Hal Vaughan

On Wednesday 26 March 2003 11:31 am, Christopher Hicks wrote:
> On Wed, 26 Mar 2003, Hal Vaughan wrote:
> > I even re-started MySQL afterward (I noticed the
> > first time I added myself as a user to those tables I had to restart =
for
> > it to take effect).
>
> You will probably get better luck using the grant command. It doesn't
> require MySQL to restart and it doesn't require you to understand the
> intricacies of how MySQL manages those tables.
>
> grant all on db.* to youruser@192.168.1.2 identified by 'password';
>

I didn't even know about GRANT. (Shows you the problems of being self-ta=
ught=20
-- you go over what seems important, but always miss something.)

It does move me forward. Now I'm getting a more specific error message:



DBI->connect(database=3Dlopas;host=3Dmysqlhost;port=3D3306) failed: Acces=
s denied=20
for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl line=
13

Now I actually get an error that includes the name of the database. I do=
n't=20
know if that's better or worse....

Hal


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 18:15:34 von Hal Vaughan

On Wednesday 26 March 2003 11:31 am, Christopher Hicks wrote:
> On Wed, 26 Mar 2003, Hal Vaughan wrote:
> > I even re-started MySQL afterward (I noticed the
> > first time I added myself as a user to those tables I had to restart =
for
> > it to take effect).
>
> You will probably get better luck using the grant command. It doesn't
> require MySQL to restart and it doesn't require you to understand the
> intricacies of how MySQL manages those tables.
>
> grant all on db.* to youruser@192.168.1.2 identified by 'password';
>

I didn't even know about GRANT. (Shows you the problems of being self-ta=
ught=20
-- you go over what seems important, but always miss something.)

It does move me forward. Now I'm getting a more specific error message:



DBI->connect(database=3Dlopas;host=3Dmysqlhost;port=3D3306) failed: Acces=
s denied=20
for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl line=
13

Now I actually get an error that includes the name of the database. I do=
n't=20
know if that's better or worse....

Hal


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 19:03:58 von Ulrich Borchers

Maybe you have to make mysqld accept tcp connections.
Those are disabled since 3.23.x versions (?) to make the default
installation more secure.
If my.cnf (possibly /etc/my.cnf) contains the line

skip-networking

then comment this line and restart mysqld.

#skip-networking

If that does not work it might be of importance in which
order mysql parses the db/user tables to determine
access privileges. Maybe you have conflicting entries
there. You could remove all but the "hal" user and
allow access from % with alle privs for testing purpose.

Uli


On 26 Mar 2003 at 12:15, Hal Vaughan wrote:
>
> DBI->connect(database=lopas;host=mysqlhost;port=3306) failed: Access denied
> for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl line 13
>
> Now I actually get an error that includes the name of the database. I don't
> know if that's better or worse....
>
> Hal
>
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=ubo1@gmx.de
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 19:03:58 von Ulrich Borchers

Maybe you have to make mysqld accept tcp connections.
Those are disabled since 3.23.x versions (?) to make the default
installation more secure.
If my.cnf (possibly /etc/my.cnf) contains the line

skip-networking

then comment this line and restart mysqld.

#skip-networking

If that does not work it might be of importance in which
order mysql parses the db/user tables to determine
access privileges. Maybe you have conflicting entries
there. You could remove all but the "hal" user and
allow access from % with alle privs for testing purpose.

Uli


On 26 Mar 2003 at 12:15, Hal Vaughan wrote:
>
> DBI->connect(database=lopas;host=mysqlhost;port=3306) failed: Access denied
> for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl line 13
>
> Now I actually get an error that includes the name of the database. I don't
> know if that's better or worse....
>
> Hal
>
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=ubo1@gmx.de
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 21:08:00 von Hal Vaughan

On Wednesday 26 March 2003 01:03 pm, Ulrich Borchers wrote:
> Maybe you have to make mysqld accept tcp connections.
> Those are disabled since 3.23.x versions (?) to make the default
> installation more secure.
> If my.cnf (possibly /etc/my.cnf) contains the line
>
> skip-networking
>
> then comment this line and restart mysqld.
>
> #skip-networking

When I installed the latest (4.0.x -- whatever was just announced as stab=
le),=20
I had NO /etc/my.cnf. Now it reads:

[mysqld]
socket=3D/var/lib/mysql/mysql.sock

[client]
socket=3D/var/lib/mysql/mysql.sock

Could my setting the sockets to this particular file be effecting this?

> If that does not work it might be of importance in which
> order mysql parses the db/user tables to determine
> access privileges. Maybe you have conflicting entries
> there. You could remove all but the "hal" user and
> allow access from % with alle privs for testing purpose.

I'll try that. Since this is all in a lan anyway, I may just allow acces=
s=20
from all on that system (in a few months it will all be ported over to ot=
her=20
systems anyway) with a password.

Thanks!

Hal

>
> Uli
>
> On 26 Mar 2003 at 12:15, Hal Vaughan wrote:
> > DBI->connect(database=3Dlopas;host=3Dmysqlhost;port=3D3306) failed: A=
ccess
> > denied for user: 'hal@192.168.1.11' to database 'MaliningList' at
> > ./test.pl line 13
> >
> > Now I actually get an error that includes the name of the database. =
I
> > don't know if that's better or worse....
> >
> > Hal
> >
> >
> > --
> > MySQL Perl Mailing List
> > For list archives: http://lists.mysql.com/perl
> > To unsubscribe: http://lists.mysql.com/perl?unsub=3Dubo1@gmx.de


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 21:08:00 von Hal Vaughan

On Wednesday 26 March 2003 01:03 pm, Ulrich Borchers wrote:
> Maybe you have to make mysqld accept tcp connections.
> Those are disabled since 3.23.x versions (?) to make the default
> installation more secure.
> If my.cnf (possibly /etc/my.cnf) contains the line
>
> skip-networking
>
> then comment this line and restart mysqld.
>
> #skip-networking

When I installed the latest (4.0.x -- whatever was just announced as stab=
le),=20
I had NO /etc/my.cnf. Now it reads:

[mysqld]
socket=3D/var/lib/mysql/mysql.sock

[client]
socket=3D/var/lib/mysql/mysql.sock

Could my setting the sockets to this particular file be effecting this?

> If that does not work it might be of importance in which
> order mysql parses the db/user tables to determine
> access privileges. Maybe you have conflicting entries
> there. You could remove all but the "hal" user and
> allow access from % with alle privs for testing purpose.

I'll try that. Since this is all in a lan anyway, I may just allow acces=
s=20
from all on that system (in a few months it will all be ported over to ot=
her=20
systems anyway) with a password.

Thanks!

Hal

>
> Uli
>
> On 26 Mar 2003 at 12:15, Hal Vaughan wrote:
> > DBI->connect(database=3Dlopas;host=3Dmysqlhost;port=3D3306) failed: A=
ccess
> > denied for user: 'hal@192.168.1.11' to database 'MaliningList' at
> > ./test.pl line 13
> >
> > Now I actually get an error that includes the name of the database. =
I
> > don't know if that's better or worse....
> >
> > Hal
> >
> >
> > --
> > MySQL Perl Mailing List
> > For list archives: http://lists.mysql.com/perl
> > To unsubscribe: http://lists.mysql.com/perl?unsub=3Dubo1@gmx.de


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 22:38:07 von Ulrich Borchers

> When I installed the latest (4.0.x -- whatever was just announced as stable),
> I had NO /etc/my.cnf. Now it reads:
>
> [mysqld]
> socket=/var/lib/mysql/mysql.sock
>
> [client]
> socket=/var/lib/mysql/mysql.sock
>
> Could my setting the sockets to this particular file be effecting this?
>

I am not familiar with the absence of my.cnf which usually contains
much more. Maybe adding "port=3306" will help.
Use netstat and telnet to find a listening tcp socket.

You could also examine/change parameters to safe_mysqld,
the accessibility of mysql-tables (file privileges) and the dsn
string which should be:
"DBI:mysql:host=192.168.1.11;port=3306;database=lopas"

>DBI->connect(database=lopas;host=mysqlhost;port=3306) failed: Access
>denied
>for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl
>line 13

Have you noticed that the error message refers to a different
database and there might be a typo in 'MaliningList' in case
it should read 'MailingList' ?!

Uli


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 22:38:07 von Ulrich Borchers

> When I installed the latest (4.0.x -- whatever was just announced as stable),
> I had NO /etc/my.cnf. Now it reads:
>
> [mysqld]
> socket=/var/lib/mysql/mysql.sock
>
> [client]
> socket=/var/lib/mysql/mysql.sock
>
> Could my setting the sockets to this particular file be effecting this?
>

I am not familiar with the absence of my.cnf which usually contains
much more. Maybe adding "port=3306" will help.
Use netstat and telnet to find a listening tcp socket.

You could also examine/change parameters to safe_mysqld,
the accessibility of mysql-tables (file privileges) and the dsn
string which should be:
"DBI:mysql:host=192.168.1.11;port=3306;database=lopas"

>DBI->connect(database=lopas;host=mysqlhost;port=3306) failed: Access
>denied
>for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl
>line 13

Have you noticed that the error message refers to a different
database and there might be a typo in 'MaliningList' in case
it should read 'MailingList' ?!

Uli


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 22:56:04 von Hal Vaughan

On Wednesday 26 March 2003 04:38 pm, Ulrich Borchers wrote:
> > When I installed the latest (4.0.x -- whatever was just announced as
> > stable), I had NO /etc/my.cnf. Now it reads:
> >
> > [mysqld]
> > socket=3D/var/lib/mysql/mysql.sock
> >
> > [client]
> > socket=3D/var/lib/mysql/mysql.sock
> >
> > Could my setting the sockets to this particular file be effecting thi=
s?
>
> I am not familiar with the absence of my.cnf which usually contains
> much more. Maybe adding "port=3D3306" will help.
> Use netstat and telnet to find a listening tcp socket.
>
> You could also examine/change parameters to safe_mysqld,
> the accessibility of mysql-tables (file privileges) and the dsn
> string which should be:
> "DBI:mysql:host=3D192.168.1.11;port=3D3306;database=3Dlopas"
>
> >DBI->connect(database=3Dlopas;host=3Dmysqlhost;port=3D3306) failed: Ac=
cess
> >denied
> >for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl
> >line 13
>
> Have you noticed that the error message refers to a different
> database and there might be a typo in 'MaliningList' in case
> it should read 'MailingList' ?!

I'll be looking into the earlier points as soon as I can. I just wanted =
to=20
reply on this one point -- I changed the name of the database so someone =
I'm=20
working with could remember which list was which. To avoid confusion, I =
had=20
been replacing the new name (lopas) with the old one when I posted the er=
ror=20
messages.

Hal

> Uli


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm

am 26.03.2003 22:56:04 von Hal Vaughan

On Wednesday 26 March 2003 04:38 pm, Ulrich Borchers wrote:
> > When I installed the latest (4.0.x -- whatever was just announced as
> > stable), I had NO /etc/my.cnf. Now it reads:
> >
> > [mysqld]
> > socket=3D/var/lib/mysql/mysql.sock
> >
> > [client]
> > socket=3D/var/lib/mysql/mysql.sock
> >
> > Could my setting the sockets to this particular file be effecting thi=
s?
>
> I am not familiar with the absence of my.cnf which usually contains
> much more. Maybe adding "port=3D3306" will help.
> Use netstat and telnet to find a listening tcp socket.
>
> You could also examine/change parameters to safe_mysqld,
> the accessibility of mysql-tables (file privileges) and the dsn
> string which should be:
> "DBI:mysql:host=3D192.168.1.11;port=3D3306;database=3Dlopas"
>
> >DBI->connect(database=3Dlopas;host=3Dmysqlhost;port=3D3306) failed: Ac=
cess
> >denied
> >for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl
> >line 13
>
> Have you noticed that the error message refers to a different
> database and there might be a typo in 'MaliningList' in case
> it should read 'MailingList' ?!

I'll be looking into the earlier points as soon as I can. I just wanted =
to=20
reply on this one point -- I changed the name of the database so someone =
I'm=20
working with could remember which list was which. To avoid confusion, I =
had=20
been replacing the new name (lopas) with the old one when I posted the er=
ror=20
messages.

Hal

> Uli


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm SOLVED

am 27.03.2003 08:23:14 von Hal Vaughan

Apologies for the top post, but it's short.

For those that have been following this:

I had overlooked simply trying to change the database I was using to 'tes=
t'=20
and it worked fine. I looked at mysql.db and found it had an entry where=
=20
User was blank (no wildcard or anything, just blank), so I inserted a sim=
ilar=20
entry for the database I wanted and it worked fine.

I just can't figure out why a similar row in the table where the only=20
difference was giving my username didn't work, but the line with a blank =
for=20
User did. I'll try more with it later, now that I've narrowed it down.

(It occurs to me I may need to give the user as hal@196.168.100.1 instead=
of=20
hal -- I'll try that later and report if it works.)

Hal


On Wednesday 26 March 2003 04:56 pm, Hal Vaughan wrote:
> On Wednesday 26 March 2003 04:38 pm, Ulrich Borchers wrote:
> > > When I installed the latest (4.0.x -- whatever was just announced a=
s
> > > stable), I had NO /etc/my.cnf. Now it reads:
> > >
> > > [mysqld]
> > > socket=3D/var/lib/mysql/mysql.sock
> > >
> > > [client]
> > > socket=3D/var/lib/mysql/mysql.sock
> > >
> > > Could my setting the sockets to this particular file be effecting t=
his?
> >
> > I am not familiar with the absence of my.cnf which usually contains
> > much more. Maybe adding "port=3D3306" will help.
> > Use netstat and telnet to find a listening tcp socket.
> >
> > You could also examine/change parameters to safe_mysqld,
> > the accessibility of mysql-tables (file privileges) and the dsn
> > string which should be:
> > "DBI:mysql:host=3D192.168.1.11;port=3D3306;database=3Dlopas"
> >
> > >DBI->connect(database=3Dlopas;host=3Dmysqlhost;port=3D3306) failed: =
Access
> > >denied
> > >for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl
> > >line 13
> >
> > Have you noticed that the error message refers to a different
> > database and there might be a typo in 'MaliningList' in case
> > it should read 'MailingList' ?!
>
> I'll be looking into the earlier points as soon as I can. I just wante=
d to
> reply on this one point -- I changed the name of the database so someon=
e
> I'm working with could remember which list was which. To avoid confusi=
on,
> I had been replacing the new name (lopas) with the old one when I poste=
d
> the error messages.
>
> Hal
>
> > Uli


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org

Re: Accessing MySQL on another machine w/ DBI.pm SOLVED

am 27.03.2003 08:23:14 von Hal Vaughan

Apologies for the top post, but it's short.

For those that have been following this:

I had overlooked simply trying to change the database I was using to 'tes=
t'=20
and it worked fine. I looked at mysql.db and found it had an entry where=
=20
User was blank (no wildcard or anything, just blank), so I inserted a sim=
ilar=20
entry for the database I wanted and it worked fine.

I just can't figure out why a similar row in the table where the only=20
difference was giving my username didn't work, but the line with a blank =
for=20
User did. I'll try more with it later, now that I've narrowed it down.

(It occurs to me I may need to give the user as hal@196.168.100.1 instead=
of=20
hal -- I'll try that later and report if it works.)

Hal


On Wednesday 26 March 2003 04:56 pm, Hal Vaughan wrote:
> On Wednesday 26 March 2003 04:38 pm, Ulrich Borchers wrote:
> > > When I installed the latest (4.0.x -- whatever was just announced a=
s
> > > stable), I had NO /etc/my.cnf. Now it reads:
> > >
> > > [mysqld]
> > > socket=3D/var/lib/mysql/mysql.sock
> > >
> > > [client]
> > > socket=3D/var/lib/mysql/mysql.sock
> > >
> > > Could my setting the sockets to this particular file be effecting t=
his?
> >
> > I am not familiar with the absence of my.cnf which usually contains
> > much more. Maybe adding "port=3D3306" will help.
> > Use netstat and telnet to find a listening tcp socket.
> >
> > You could also examine/change parameters to safe_mysqld,
> > the accessibility of mysql-tables (file privileges) and the dsn
> > string which should be:
> > "DBI:mysql:host=3D192.168.1.11;port=3D3306;database=3Dlopas"
> >
> > >DBI->connect(database=3Dlopas;host=3Dmysqlhost;port=3D3306) failed: =
Access
> > >denied
> > >for user: 'hal@192.168.1.11' to database 'MaliningList' at ./test.pl
> > >line 13
> >
> > Have you noticed that the error message refers to a different
> > database and there might be a typo in 'MaliningList' in case
> > it should read 'MailingList' ?!
>
> I'll be looking into the earlier points as soon as I can. I just wante=
d to
> reply on this one point -- I changed the name of the database so someon=
e
> I'm working with could remember which list was which. To avoid confusi=
on,
> I had been replacing the new name (lopas) with the old one when I poste=
d
> the error messages.
>
> Hal
>
> > Uli


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org