MYSQL Version: 5, OS: RHEL5
MYSQL Newbie here. I am trying to create a database in a different directory without disturbing other databases. Looking up at stackoverflow, it seems that only way to do this in MYSQL5 is to create symlinks.
The default data directory is '/var/lib/mysql' and default user is 'mysql' as specified in /etc/my.cnf file. This data directory is owned by linux user/group mysql.
So if I create a symlink inside this directory, it has to be owned by user/group mysql. (I don't want to change permissions of this folder and mess up other databases). Also for this symlink method to work, I need to give access to intended data directory for user mysql (which is also not acceptable).
I tried creating my own configuration file ~/.my.cnf with user and datadir set to desired values and ran "mysql --defaults-file=~/.my.cnf". But it doesn't work. Keeps pulling the list of databases from the default location.
How do I move away from this 'mysql' user tangle, just for my database?