Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: connect to DBD::MYSQL

by Tux (Monsignor)
on Jan 31, 2014 at 21:06 UTC ( #1072910=note: print w/ replies, xml ) Need Help??


in reply to connect to DBD::MYSQL

  1. Please remove your credentials (or replace them with something stupid)
  2. Is localhost present in /etc/hosts?

Enjoy, Have FUN! H.Merijn


Comment on Re: connect to DBD::MYSQL
Re^2: connect to DBD::MYSQL
by fionbarr (Pilgrim) on Jan 31, 2014 at 21:11 UTC
    thanks....the credentials are already 'stupid'. This is a windows7 machine.

      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?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1072910]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2014-10-02 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls