LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache MySQL PHP configuration (https://www.linuxquestions.org/questions/linux-software-2/apache-mysql-php-configuration-141387/)

Gilion 02-02-2004 10:43 AM

Apache MySQL PHP configuration
 
I'm setting up a website using MySQL. After adding MySQL to my server I am running a full Linux-Apache-MySQL-PHP server. Although there is a lot of information on configuring user access for databases, I keep running into a number of problems at FAQ-level. However no answers where satisfactory yet. :newbie:

All question deal with the web of permissions in MySQL. The separate manuals of Apache, PHP and MySQL refer to each other in these issues.

About user Identity?
At my website mysql_connect() is successive. Which value for Host, User and Password am I passing then? Is this user Apache (the user who runs apache-daemons) or SiteOwner (like in: http://MyHost/~SiteOwner/)?

This mysql_connect doesn't give access to any database (mysql_select_db() always fails). In the main mysql database, the user table only has users named root and MyHost and no apache or SiteOwner. Why do I get in at the first place? How can there be blanks in these tables, what do they mean? Logging in without user name seems impossible to me, am I right?

Also strange: I've created a database as rootuser, which I can use from command line. However, this database isn't mentioned in the db table of the main mysql database. What's that supposed to mean?

Is there anyone with good documentation on the configuration of users and permissions in an Apache, PHP and MySQL platform. Somehow the separate manuals, the forums and the FAQ's don't point out how this is working.

BTW, what about the safety issues coming up in this context?

I'll appreciate any good information on this one.

tk31337 02-02-2004 10:58 AM

Well, afaik, MySQL has it's own users seperate users which are completely different than the system users, and you can create users with the "createuser" script iirc. I could be completely screwed up and thinking of Postgre instead. Anyhow, if you really want to make a complex site using PHP and an SQL backend I'd suggest using something like phpNuke or ezPublish. They are "content management" systems that use PHP and MySQL to create a completely interactive site that you can even administer through php front-ends. Basically they setup a site for you like slashdot or newsforge with forums, news with reply capability, polls, and all kinds of crap. Probably would save you a lot of time. Just an idea.


All times are GMT -5. The time now is 11:05 PM.