in reply to Re: NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl
in thread NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl

I am using version Net-MySQL-0.09 see response when I turned debug on;
pohara@pohara-desktop:~/automation$ perl MySQL_queryDB.pl Use INET Socket: testscript 3306/tcp Net::MySQL::_get_server_information(): 30 00 00 00 0A 34 2E 30 2E 32 36 2D 73 74 61 6E 0....4.0.26-stan 64 61 72 64 00 83 20 00 00 57 39 58 2D 75 2A 6B dard.....W9X-u*k 60 00 2C 20 08 02 00 00 00 00 00 00 00 00 00 00 ..,............. 00 00 00 00 .... Protocol Version: 10 Server Version: 4.0.26-standard Salt: W9X-u*k` Net::MySQL::_send_login_message(): 41 00 00 01 0D A6 03 00 00 00 00 01 21 00 00 00 A............... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 74 65 73 74 65 72 00 14 93 96 51 55 ....tester....QU 6C AC FB C7 30 FC 89 04 3B A8 77 74 60 17 A3 4F l...0...;.wt...O 74 65 73 74 00 test. Net::MySQL::_request_authentication(): 4E 00 00 02 FF 15 04 41 63 63 65 73 73 20 64 65 N......Access.de 6E 69 65 64 20 66 6F 72 20 75 73 65 72 3A 20 27 nied.for.user..' 40 73 62 2D 64 65 73 6B 74 6F 70 2E 6C 6F 63 61 .sb-desktop.loca 6C 2E 63 6F 72 76 69 6C 2E 63 6F 6D 27 20 28 55 l.corvil.com'.(U 73 69 6E 67 20 70 61 73 73 77 6F 72 64 3A 20 4E sing.password..N 4F 29 O) Access denied for user: '@sb-desktop.local.server.com' (Using password +: NO) at MySQL_queryDB.pl line 5 pohara@pohara-desktop:~/automation$
  • Comment on Re^2: NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl
  • Download Code

Replies are listed 'Best First'.
Re^3: NET:MySQL database connection error -- (Using password: NO) at MySQL_queryDB.pl
by marto (Cardinal) on Sep 24, 2009 at 13:16 UTC

    Hmm, I don't have time to look any further at Net::MySQL at the momemnt, have you considered using DBD::MySQL as mentioned in the MySQL documentation?

    Martin

      got it working with DBI.... the only thing is if I want to pull back a table from the Database ... it is returned in the form of DBI::st=HASH(0xa0dc0c0) ... Is there anyway of pulling back the Table contents in a more readable format??

        You can get result as array using one of the following functions:

        $ary_ref = $dbh->selectall_arrayref($statement); $hash_ref = $dbh->selectall_hashref($statement, $key_field);
        Consider to read DBI documentation. Also if you provide us with your code then asking question it would be simpler to give you useful answer.