Mike Watson wrote:
> Hello, I am new to the list and I hope this is the appropriate place to
> post this question.
> My ISP has MySQL installed in /usr/local/share/mysql/ but does not provide
> any support on MySQL. I do not have write permission on that directory so
> when i do a CREATE DATABASE miketest; no directory is created, logged in
> as root, I do get the result Query OK, 1 row affected (0.07 sec).
> When I do a CREATE TABLE test(name VARCHAR(15)); I get
> Query OK, 0 rows affected (0.34 sec)
> test.frm does not exist. Is there a way to get MySQL to create the
> database in an alternate location? I would like the database directories
> and files to be in my local workspace.
> Thank You for your time.
> Mike Watson
You don't need write access on /usr/local/share/mysql only the user mysqld is running
under must have write access there.
Did you issue: FLUSH TABLES after the CREATE TABLE?
Yes you can change the directory for the databases with the my.cnf configuration file.
You can find more infos on this in the mysql manual.