Installed mysql dmg package from mysql.com. Started it with the helper. The database runs, can login as root, create users. Did create a database called "dhcs". I can't create a table..

mysql> use dhcs;  
Database changed
mysql> create table user ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(20), password VARCHAR(20));
ERROR 1 (HY000): Can't create/write to file '/usr/local/mysql/data/dhcs/user.MYI' (Errcode: 2)
$ ls -la /usr/local/mysql-5.1.41-osx10.5-x86/data/dhcs/
total 8
drwx------  3 _mysql  wheel  102 Sep 28 20:02 .
drwxr-x---  9 _mysql  wheel  306 Sep 28 18:30 ..
-rw-rw----  1 _mysql  wheel   65 Sep 28 18:30 db.opt

$ ps aux|grep mysql
_mysql     176   0.0  0.4   651140  15332   ??  S     4Sep10   2:34.20 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --log-error=/usr/local/mysql/data/host.local.err --pid-file=/usr/local/mysql/data/host.local.pid
root       125   0.0  0.0  2439240    336   ??  S     4Sep10   0:00.02 /bin/sh ./bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/host.local.pid

What might be the problem here?

link|improve this question
@Marcus, no, this is not about programming. Apart from that: "belongs on" comments without any further explanation about voting and automatic migration, just tend to result in unwanted duplicates (see here). Enjoy! – Arjan Sep 28 '10 at 18:51
3  
Looks like your permissions may be the problem. MySQL may not have write permission on the folder. – Randolph West Sep 28 '10 at 19:03
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.