in reply to Re: connect to DBD::MYSQL
in thread connect to DBD::MYSQL

thanks....the credentials are already 'stupid'. This is a windows7 machine.

Replies are listed 'Best First'.
Re^3: connect to DBD::MYSQL
by Tux (Canon) on Jan 31, 2014 at 21:26 UTC

    Did you try to replace localhost with 127.0.0.1?

    edit (added question): Is the error really 'Unknown MYSQL server host ' localhost' <11004>', as in '<space>localhost? Could it be your code is not actually what you pasted, and the is a space before $hostname?


    Enjoy, Have FUN! H.Merijn
      the code is identical, i.e. NO space before 'localhost' tried with 127.0.0.1 get failed: access denied for user 'test_user'@'localhost' I am doing this and still doesn't work
      use test; # create table (name char(20)); CREATE USER 'test_user'@'localhost'; GRANT ALL PRIVILEGES ON * . * TO 'test_user'@'localhost'; select * from ttt;
      seems like the 'user' does not have access privileges. Any ideas?
        "...Any ideas?"

        Not really. Did you try SHOW GRANTS FOR 'test_user'@'localhost'; (..assuming you can connect via mysql client)? I know, i guess...but don't we do that every day?

        Regards, Karl

        «The Crux of the Biscuit is the Apostrophe»