RE: perl/mysql issue...
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 'mysqlshow 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
perl/mysql issue...
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]
Re: perl/mysql issue...
At 10:52 AM 5/3/05 -0700, [EMAIL PROTECTED] wrote: 'DBD::mysql::db selectrow_hashref failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) at /var/www/html/cgi-bin/DBI/Role.pm $ mysql -uroot -p mysql CREATE DATABASE livejournal; mysql GRANT ALL PRIVILEGES ON livejournal.* TO lj@'localhost' IDENTIFIED BY 'ljpass'; Yeah, just add [EMAIL PROTECTED] to ur Grants and it should work. MySQL see's that ip and not localhost when Perl connects to it. -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede males 0100 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: perl/mysql issue...
bruce wrote: The problem is in your code, not your db. 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. MySQL just told you that you connected as [EMAIL PROTECTED] with *no password*. Presumably, this means $pass has no value on the following line. $dbh = DBI-connect($dsn, $user, $pass, { PrintError = 1, AutoCommit = 1,}); - From your debug output, perhaps you set $passwd but used $pass? 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'; --- [EMAIL PROTECTED] can connect and use db livejournal. i can access the mysql db/livejournal from the mysql client/command line. mysql -ulj -host192.168.1.55 -p but here you connect as [EMAIL PROTECTED] localhost is special to mysql. That is, localhost and 192.168.1.55 are not the same thing. See the manual for details http://dev.mysql.com/doc/mysql/en/connection-access.html. 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... Then use localhost, not 192.168.1.55, in your connection string. 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] Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: perl/mysql issue...' (Using password: NO)'
ummm i made a mistake in what i posted... a typing error... it should have been 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@'192.168.1.55' IDENTIFIED BY 'ljpass'; --- which should/does allow me to access the mysql/db from the mysql command line client... my issue that i've tracked down to mysql, is that once i'm inside/running mysql, i can do a 'use livejournal' which selects the livejournal database. when i do the following 'mysql show slave status' i get the error '(Using password: NO)'. i can access the 'mysql' databases/tables ('use mysql') and then run 'show slave status' with no problem... (due to my not having setup any root passwd as of yet... so, how/what do i need to do to resolve this issue!! i would imagine that this is a function of access/privs but i'm not sure what has to be set. thoughts/comments/ideas/etc... thanks bruce [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of bruce Sent: Tuesday, May 03, 2005 10:53 AM To: perl-win32-users@listserv.ActiveState.com; mysql@lists.mysql.com; 'Nikolas Coukouma' Subject: perl/mysql issue... 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] ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]