kristen...

the issues that i saw/reolved (at least for now) have to do with how mysql
sets things up for replication, which has to do with granting the correct
privs/rights...

i did the following:

1) create the database (foo)
2) grant all privs to user for foo on host
3) grant replication slave, replication client on *.* to host/user

create database livejournal
GRANT ALL PRIVILEGES ON livejournal.* TO 'lj'@'192.168.1.55' IDENTIFIED BY
'ljpass';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO lj@"192.168.1.55"
IDENTIFIED BY 'ljpass';

i also had to remember to start mysqld --old-passwords to allow my perl/php
apps to communicate with the mysql4.1 db

i can now do the 'show slave status' and access the db from perl...

this seems to have allowed me to get past this hurdle...

-bruce


-----Original Message-----
From: Kristen G. Thorson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 04, 2005 8:21 AM
To: [EMAIL PROTECTED]
Subject: Re: perl/mysql issue...


Bruce,

You can't issue SHOW SLAVE STATUS because you only have permissions on
the livejournal database.  Try this:  as root or someone with sufficient
privileges,

GRANT USAGE on *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'ljpass';

(Usage basically only allows login.  You're not granting this user
anything else, except to ability to issue

USE livejournal;


kgt




bruce wrote:

>hey kristen...
>
>the issue is a mysql/privs/rights issue. i get the err msg when i simply do
>the 'mysql -ulj -h192.168.1.55 -p' and then after entering the passwd, if i
>do a 'mysql>show slave status' i get the err msg....
>
>so it definitely is something that's realted to mysql/tables/privs/access
>setup...
>
>i'm not currently knowledgable enough regarding mysql to laser in on the
>issue...
>
>-bruce
>
>
>-----Original Message-----
>From: Kristen G. Thorson [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 03, 2005 1:45 PM
>To: [EMAIL PROTECTED]
>Subject: Re: perl/mysql issue...
>
>
>My apologies, Bruce.  I normally add users manually (INSERT INTO
>mysql.Users...) so I have to use the PASSWORD() function.  It is not
>necessary with a GRANT statement.  And the reason CURRENT_USER() didn't
work
>is because it is not available until version 4.0.
>
>Okay, then next focus on the error message.
>
>
>Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)
>
>It's correctly displaying your username and host, but saying you are not
>using a password.  You should get this error if you try to log in via
>command line and don't include a password.  Your user name and password are
>correctly set up, since you didn't make the 'error' I pointed out with the
>GRANT statement, and you can log in via command line.  This means it's
>probably in your code somewhere.  I'm not a perl person, so I'm not going
to
>be able to help you much beyond this point, but try to echo the values you
>pass into the DBI connect:
>
>
>$dbh = DBI->connect($dsn, $user, $pass, {
>           PrintError => 1,
>           AutoCommit => 1,});
>
>Perhaps your password is not getting passed in.  Are you sure $pass
contains
>a value at this line?
>
>
>kgt
>
>
>
>
>bruce wrote:
>
>kristen..
>
>i made a typo.. i've been using 192.168.1.55 but i accidentally typed
>localhost below.. everything i'm doing/have done has been 192.168.1.55.
>
>i tried to enter your grant action:
>mysql> GRANT ALL PRIVILEGES ON livejournal.* TO
>     > lj@'192.168.1.55' IDENTIFIED BY PASSWORD('ljpass');
>
>and mysql threw a syntax error regarding the 'PASSWORD/password' attribute
> the same thing happened when i tried 'select current_user();
>
>i'm running mysql 3.28.53
>
>any other ideas/thoughts...
>
>-bruce
>
>
>-----Original Message-----
>From: Kristen G. Thorson [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 03, 2005 12:05 PM
>To: [EMAIL PROTECTED]
>Subject: Re: perl/mysql issue...
>
>
>mysql> GRANT ALL PRIVILEGES ON livejournal.* TO
>     > lj@'localhost' IDENTIFIED BY 'ljpass';
>
>
>Should be:
>
>mysql> GRANT ALL PRIVILEGES ON livejournal.* TO
>     > lj@'localhost' IDENTIFIED BY PASSWORD('ljpass');
>
>
>And
>
>i can access the mysql db/livejournal from the mysql client/command line.
>mysql -ulj -host192.168.1.55 -p
>
>
>When you log in, issue SELECT CURRENT_USER();  This will tell you who
>exactly you are logged in as.  Sometimes, you are not logged in as the
>user you think.  You created user [EMAIL PROTECTED], but are logging in as
>[EMAIL PROTECTED]  These are different users.  If 192.168.1.55 is not the
>computer where mysql db resides, then you need to create a user account
>[EMAIL PROTECTED] or change your connect string to host=localhost.
>
>HTH,
>kgt
>
>
>
>
>bruce wrote:
>
>
>hi...
>
>i have the following issue.. i've researched it from google.. but i still
>can't quite figure it out...
>
>i'm using a test app with DBI->connect() and i'm getting the following
>response... (print/debug statements...)
>----------------------------------------------------------------------
>'bd dsn =
>DBI:mysql:livejournal;host=192.168.1.55;port=3306;mysql_connect_timeout=2
>'bd user = lj
>'bd passwd = ljpass
>'bd fdsn1 = DBI:mysql:livejournal;host=192.168.1.55;port=3306|lj|ljpass
>'bd loops dbh = 0
>'bd loops user = lj
>'bd loops pass = ljpass
>'bd loops dbh111 = DBI::db=HASH(0x9bf20c8)
>'DBD::mysql::db selectrow_hashref failed: Access denied for user:
>'[EMAIL PROTECTED]' (Using password: NO) at /var/www/html/cgi-bin/DBI/Role.pm
>line 347.
>
>       $dbh = DBI->connect($dsn, $user, $pass, {
>           PrintError => 1,
>           AutoCommit => 1,});
>-----------------------------------------------------------------
>
>
>
>i did the following to configure the mysql database/table
>------------------------------------------
>$ mysql -uroot -p
>mysql> CREATE DATABASE livejournal;
>mysql> GRANT ALL PRIVILEGES ON livejournal.* TO
>    > lj@'localhost' IDENTIFIED BY 'ljpass';
>-------------------------------------------
>
>i can access the mysql db/livejournal from the mysql client/command line.
>mysql -ulj -host192.168.1.55 -p
>
>
>i'm pretty sure i've somehow made an error/left something out when
>configuring the mysql db for access from perl apps. i'm running the perl
>
>app
>>from the same machine...
>
>can anyone give me pointers/shed light on what i might need to change. my
>gut tells me that there's some mysql table/attribute that needs to be
>changed, but i'm not that familiar with mysql...
>
>thanks
>
>bruce
>[EMAIL PROTECTED]
>
>
>
>
>
>
>
>
>
>.
>
>
>
>
>.
>
>
>



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to