[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-developers] Creating MySQL Database from PHP



-----Original Message-----
From: cobalt-developers-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx] On Behalf Of Distortal
Sent: Wednesday, July 16, 2003 1:50 AM
To: cobalt-developers@xxxxxxxxxxxxxxx
Subject: RE: [cobalt-developers] Creating MySQL Database from PHP

> How do I set permissions to access a database?

-----

mysql> grant all on database.* to username@'ip address or hostname'
identified by 'password';

We usually run something like this:

create database database_name;
grant all on database_name.* to username@localhost identified by
'password';
grant all on database_name.* to username@'192.168.0.%' identified by
'password';

The last statement lets the user connect to the database from any IP
address on the 192.168.0 subnet (192.168.0.x.)

Much more information is available at the MySQL website. Also, Paul
Dubois' book "MySQL" has great information regarding GRANT statements
and what you can do with them.

HTH,
Erica Douglass
Lead Web Developer
Simpli, Inc. Web Hosting
http://www.simpli.biz
--
Simpli is now offering dedicated RaQ4s and dedicated RaQ550s starting at
$79/month... including a 100% Network Uptime Guarantee! 
Colocation and virtual hosting also available. 
See www.simpli.biz for details.
--