Koozali.org: home of the SME Server

MySQL user access (public) and email on virtual domains...

Peter Farsinsen

MySQL user access (public) and email on virtual domains...
« on: September 03, 2002, 04:26:37 PM »
Is it possible to allow users access to the MySQL database? I have ganted all access to the admin using the admin pass, but when setting up other users it's not possible to login using the username / userpass, not even local ... Is it possible to grant users access both locally and from the internet !?

Furthermore i would like to host more than one domain, it seems to work just fine ... though if it's possible to set up more than one mail server so that test@domain1.tld differs from test@domain2.tld that would be so nice ... now is it!?

Geoff Bennion

Re: MySQL user access (public) and email on virtual domains.
« Reply #1 on: September 04, 2002, 12:35:55 PM »
on the server ( local )

mysql

grant on . to @ identified by '';

where


is select, update, delete, all etc ( depending on preference )
is the database name ( * for all )
is the table name in the database ( * for all )
is a username, doesn't have to be a valid linux account
is the domain name that they will be accessing it from
is the username password.

e.g.

Grant ALL privs to GEOFF user with password TEST on database DATA, all tables, connecting from the www.hgs.co.uk dns.

grant ALL on DATA.* to geoff@www.hgs.co.uk identified by 'TEST';

Grant ALL privs to PUBLICUSER with no password, to database PUBLICDB, all tables, connecting from ANY IP ADDRESS

grant ALL on PUBLICDB.* to publicuser@'%' ;


The E-mail is possible, there is a post on the experienced forum about it.

Geoff.

Geoff Bennion

Re: MySQL user access (public) and email on virtual domains.
« Reply #2 on: September 04, 2002, 12:40:08 PM »
Ooops, I forgot.

To enable access to the mysql database, you will need to alter the ipchains scripts.


I cheated and edited /etc/e-smith/templates/etc/rc.d/init.d/masq/45DenyMySQL
(changed the denylog to ACCEPT )

/sbin/e-smith/expand-template /etc/rc.d/init.d/masq
service masq restart

The proper way is to copy the 45DenyMySQL into the custom templates dir and alter it there.


Geoff