Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Using DB->connect for mysql db without password

by jfroebe (Parson)
on Sep 11, 2013 at 13:06 UTC ( #1053489=note: print w/replies, xml ) Need Help??

in reply to Using DB->connect for mysql db without password

You should always have a password set for any logins to a dbms even if it is just you accessing the database.

Jason L. Froebe

Blog, Tech Blog

  • Comment on Re: Using DB->connect for mysql db without password

Replies are listed 'Best First'.
Re^2: Using DB->connect for mysql db without password
by angeloulivieri (Novice) on Sep 11, 2013 at 13:22 UTC

    I don't want to appear stupid... :D

    My problem is that I'm creating a software that does some analysis based on the use of a MySQL database. Now, I installed this program on a machine where I seen that mysql can be accessed without any pwd and usr. So I was wondering: "what if the user didn't set these two parameters?".

    I'm going crazy searching for an answer. I think now that this is not a possible situation with PERL DBI... is it true?

      Have you tried using undef or '' for the username and/or password?

        Yes, I tried. It didn't worked....

      What software are you using, exactly? You don't seem to call DBI->connect, but rather a connect method on a different object. What kind of object is it?

      Usually connecting to mysql without user name and without password only works if you don't specify a host name either (not even localhost), then local domain sockets are used, and the identity of the system user is used.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1053489]
[Corion]: Hurr. Yesterday I played around with ffmpeg as a new toy and found its "scene" filter great - it detects scene changes. Now I could write a module that splits a given video on its cuts into different scenes. Except I have no use case for that :)
[Corion]: (and also, writing yet another FFmpeg module just to wrap system() and grep through its output isn't all that great ...)
[erix]: cut out advertisements from movies? :)
[erix]: robably not possible (or it would have been done already)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2018-05-24 11:10 GMT
Find Nodes?
    Voting Booth?