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.
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.