[buug] MySQL permissions question

Robert Roberts info at gooddoggygrafx.com
Fri Jul 27 12:12:20 PDT 2001

While this isn't strictly a Unix question, maybe someone out there is
familiar enough with administering MySQL to clarify a permissions question.
I have read and re-read the available documentation and a variety of
tutorials regarding the MySQL Access Privelege System, but am still unclear
on a few details. I've also scoured what I've been able to find via forums.
MySQL is successfully installed, and I am able to connect, create databases,
tables, etc.

The scenario:
---I'm running a small server with FreeBSD 3.4, Apache 1.3.17, PHP 4.0.4pl1,
and have just migrated to MySQL 3.23.40 [yes, I must now re-build
---The server hosts my own sites, plus a few others.

The goal:
---I want to set up a database for one of my hosting clients. They would
like to use a php-based application for events announcements, which requires
access to a database. The php application sets up a browser-based
administration gui. I would do all set-up for them, and show them how to use

My assumption:
mysql> GRANT SELECT, INSERT, UPDATE ON client_db.*
            TO db_user at localhost IDENTIFIED BY 'password';

Now this is where I get a bit confused. It's not clear to me where the
client is connecting from. I assume they are connecting from  localhost
because everything is all on the same server. But:
---are they, in actuality, connecting from their own virtual host, "
db_user at virtual_host.com "?
---they are connecting from a remote machine, so are they, then, connecting
from some other host?
---if they are connecting from a remote machine with a dial-up connection,
then it is undoubtedly a dynamic IP address, so there would be no consistent
"host" to connect from.

I believe I've supplied all relevant info, so if someone is able to shed
some light on this, I will be most appreciative.

Robert Roberts
info at gooddoggygrafx.com

More information about the buug mailing list