Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: how to connect to mysql as anonymous user with perl

by PeterPeiGuo (Hermit)
on Dec 30, 2010 at 18:33 UTC ( #879853=note: print w/replies, xml ) Need Help??


in reply to how to connect to mysql as anonymous user with perl

If this is a vanilla installation of mysql, the user name for anonymous user is "" (empty string) - that's the reason why it was called an anonymous user, and the password is also "".

Peter (Guo) Pei

  • Comment on Re: how to connect to mysql as anonymous user with perl

Replies are listed 'Best First'.
Re^2: how to connect to mysql as anonymous user with perl
by oko1 (Deacon) on Dec 30, 2010 at 18:46 UTC

    Invoking MySQL without a username or a password defaults to the current login and no password:

    perl -MDBI -we'my $dbh=DBI->connect("dbi:mysql:","","")' DBI connect('','',...) failed: Access denied for user 'ben'@'localhost +' (using password: NO) at -e line 1

    ...and there doesn't seem to be any way to force it to accept a blank username, either:

    mysql --user="" --password="" ERROR 1045 (28000): Access denied for user 'ben'@'localhost' (using pa +ssword: NO)
    -- 
    Education is not the filling of a pail, but the lighting of a fire.
     -- W. B. Yeats

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2021-10-22 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?