On Wed, 20 Aug 2003 10:52:35 -0700
"bruce" <[EMAIL PROTECTED]> wrote:

> I have added the mysql user/password to the php file. I can access mysql
> using the user/password from the linux command line.
What login & pass do you use in PHP and what login & pass do you use in command line?
Hmm..let me guess: you just type "mysql" and it works?
If yes, then you just using default root login without password.
You need to use GRANT(read corresponding docs) to add another one user, cause your PHP 
app definitely do not need root privileges.
And don't forget about FLUSH PRIVILEGES.

> However, when I check mysql, I don't have an Apache user defined in the user
> table. Do I need to have one defined, or should the php app utilize the
> user/passwd/dbname that I provide in the db_connect function?
There is no "Apache user".
You may add user with login "my_super_duper_user" and use it in PHP to connect to 
MySQL.
 
> I can access the phpMyAdmin application with no apparent issues/problems...
Your phpMyAdmin uses default settings too.

> As an additional question, if I have a web app that has a mysql db, do I
> need to allow Apache to have access to each table that the app uses...?????
Not Apache, but user, that is used by your PHP app should have access to tables & 
databases, which you want to read/change.
Read about GRANT in docs and give corresponding privileges to your user.
 
> Any help/assitance/pointers to resolve this would be greatle appreciated...
http://www.mysql.com/doc/en/GRANT.html

---
WBR,
Antony Dovgal aka tony2001
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to