Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

MySQL question

Name: Anonymous 2013-09-05 21:08

(sorry for not knowing technical terms for all of this, I understand languages on more of a conceptual basis)

I've just started messing around with mySQL and decided I wanted to use it to store some information. But I have a question about how users would be kept out of the database.

If I make a file that accesses a database and adds info to it, there has to be a line like "mysql_connect("localhost", "root", "");" to connect to the database (with PHP anyways).

But what if the code is open source, and anyone can look at and see this line? I figured I could force the user to input information such as username and password so that the mentioned line wouldn't reveal anything that the user didn't already know, but what if the user was, for example, creating an account? The user doesn't have anything associated with the database yet, but information has to be written to the database to initialize their account, which would require a user with higher privileges than I want the user to have.

I don't want users to be able to access the database at all, but I know that anything I code has to access the database to read and write data. How would that be possible?

Name: Anonymous 2013-09-05 21:11

You don't open source the config file you twat.

Name: Anonymous 2013-09-05 21:11

that's why you don't open source the code! there's a reason why quality software like photoshop, maya or 3d studio are not open source

Name: Anonymous 2013-09-05 21:31

Yeah, I was figuring there's no resolution if it's all open-source; guess I'll just restrict a file that holds sensitive info.

Thanks!

Name: Anonymous 2013-09-06 18:17

>>4
It can be all open source.
The official product can contain a dummy user/password/db/etc., while you can maintain a private fork of it containing your personal details. That way it is fully open source.

Don't change these.
Name: Email:
Entire Thread Thread List