how to not write password in code for using to mysql?

This is a discussion on how to not write password in code for using to mysql? within the MySQL Database forums, part of the Database Forums category; I don't know if this has been mentioned, but one way you can do it is to store the ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #21 (permalink)  
Old 06-26-2007
cbmeeks
 
Posts: n/a
Default Re: how to not write password in code for using to mysql?

I don't know if this has been mentioned, but one way you can do it is
to store the passwords in some weird place (outside htdocs/www) and
simply mangle the password.

For example, in some of my python scripts, I load a config file that
contains password for db.

The password might be: red*igloo

But in the config file, it's: 0r05ed**0igloo55

Then, in python: pass =
pass.replace("0","").replace("5","").replace("**", "*")

That's a crude example but you get the idea. Of course, this is NOT
bullet proof if the user can browse your source code and they can
probably figure it out but even if it stops 50% of potential thieves,
it is worth it because it is so easy to do.

Of course, you should make sure you are using a reliable host from a
good company.
http://eblarg.com


On May 27, 5:15 am, "_mario.lat" <n...@libero.it> wrote:
> hallo,
> I use PHP and I'd like to not write in hardcoded way password
> and login to access to mysql.
> how to not write password in code for access to mysql?
> How can I do?
> I'd like that who see my code don't see my paswords.
> there is a solution?
> Thank you in advance.
> Mario.



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:59 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0