Web Hosting Talk







View Full Version : configuring mySQL for users


interactive6
07-01-2002, 08:35 PM
How do I limit MySQL users to their own databases? but let them edit tables, ect. Is there an easy solution i can install?

.John

jalonz
07-01-2002, 11:21 PM
Assuming you are running a Raq.

I think you have two problems:

1) Setting the user's permissions. This is difficult, messy and I dont think many people really get it figured out.

I think this is about as simple as it can get:

http://www.mysql.com/doc/A/d/Adding_users.html

phpMyAdmin, below, can admin users but I have never actually done it.


2) Getting users actually connected to the database.

Users can connect from a client on their PC/workstation, but this has problems because you dont necessarily want to run MySQL with a port open to the net, it should just be serving the local Raq websites.

Users can login to a shell on the local Raq and run the mysql client from there, but that means you would be giving them shell access, which might not be part of the plan.

I reserve each Raq's root website for MRTG stats and other per-user things and install phpMyAdmin in one of its subdirecetories. It uses the MySQL db/table access permissions to implement a basic http login to a pure web interface to MySQL. A user logs in and all they can see/modify/etc. is what MySQL is set to give them. They can do anything they need to, including paste in scripts and download dumps, etc.

http://www.phpmyadmin.net/

a live demo is here: http://www.phpmyadmin.net/phpMyAdmin/