> On Sun, 11 Feb 2007 17:15:52 -0500 (EST) > "Justin S. Leitgeb" <[EMAIL PROTECTED]> wrote: > >> >> http://dev.mysql.com/doc/refman/5.0/en/server-options.html >> > >> > This could work if --datadir means just and only the databases, >> > and not any other files. It would be a nice trick even. >> >> According to the documentation page above, --datadir does mean just the >> database files. The location of the other files used by MySQL is >> specified by the --basedir directive. > > Better it sounds than it looks. > > I've quick-tested this on deleuze, and mysql immediately > created additional files in the new datadir: > > ib_logfile0 > ib_logfile1 > ibdata1 > mysql_upgrade.info > > Do the 0, 1 etc. mean mysql will create more files with higher > numbers in there, or this is it? Maybe we could live with those > four if mysql will not attempt to delete/recreate them at some > point (or create new ones). > >
I´m not sure if there will be files with higher numbers, but remember that MySQL will create at least one database in this directory for user information, etc. Perhaps these are related to this mysql function? I guess the real test would be to log in as a user and try to create a new database with a previously used name once the permissions are set so that only mysql can write in datadir. If this doesn´t work, perhaps we can do the following: 1) Create mysql user accounts for all users that don't have permissions for CREATE or DROP DATABASE 2) Make sure that only the user that dbtool connects to the MySQL server as is able to drop and add databases. Maybe that is a more elegant solution in the end anyway... Sorry if these solutions are dead ends, I'm just trying to brainstorm based on some past experience with MySQL. _______________________________________________ HCoop-SysAdmin mailing list [email protected] http://hcoop.net/cgi-bin/mailman/listinfo/hcoop-sysadmin
