[plug] Help setting up Apache/PHP on Debian

Mark O'Shea mark at musicalstoat.co.uk
Sun Mar 28 11:58:48 WST 2004


On Sun, 28 Mar 2004, Chris Caston wrote:

> Thanks everyone for your help I've got php4 working now but I still have
> a problem with it not being able to access the database and of course I
> don't know how to use MySQL...
>
> Whats the commands for adding a user account and setting the hostname?
>
> thanks,
Heh, well the excelent MySQL online manual gives quite clear instructions
for that...

One good way of doing it is :
GRANT all ON database TO user at host IDENTIFIED BY PASSWORD 'password';

just substitute a list of privileges for all, the username you want to use
for user, the hostname they are connecting from for host and the password
you want to use for password.

Remember with the hostname that if the code connecting to the database is
local that it will need localhost as the hostname if you are using
localhost to connect, or the actual hostname if you are using the hostname
to connect (like some scripts that are available do).

Regards,
Mark O'Shea




More information about the plug mailing list