![]() |
mysql_connect security issue
Hi, (I'll try this again, this time in the right forum :nervous:)
Please forgive my newbie question, but is using mysql_connect from vb to insert info into a second database a security risk? Is using the database name, user name and password safe from those viewing the forum? Thanks, still Larning. Is this question too difficult, or too retarded? |
hmm, actually i don't really understand where there should be an issue.
vb makes a connecten to a db, but that is totally isolated from a second connection, so if you write your scripts carefully, a second db connection is no security risk |
Thank you for replying Xenon.
I simply do not know much about database connections, so am unsure as to the correct way of connecting 2 databases. Would the following constitute a safe connection? Code:
//connecting to second database Thanks in advance. |
from what i see, there is no security problem in the code, just two things to think about:
1) vb3.5 allows a second connection set up from within config.php afaik, which could make things a bit easier for you 2) are you sure you need TABLE_PREFIX in your query, as you are connecting to a second db, no the vb one, that could produce an error. as for the security again: yep that's ok, as noone could directly view into the php files and see the pw :) |
It's only a security risk if injection is possible such that the username/password/database/server/query can be read/altered. As for performance, that depends on how MySQL is set up.
|
Quote:
|
This is great stuff.
Thanks guys, I do appreciate your replies and info. At least Im on the right track and my learning curve can now continue / expand. Cheers. |
Quote:
seem si have to look at that feature again. couldn't test it as locally i just have one and never saw a need for it ;) |
All times are GMT. The time now is 10:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|