Quantcast
Channel: MySQL Forums - Install & Repo
Viewing all articles
Browse latest Browse all 7239

Fresh install on OS X 10.5, can't create tables -- bad permissions on data dir? (1 reply)

$
0
0
Howdy,

I just installed MySQL 5.1.50 onto an OS X machine running 10.5.8. I included both the startup item and the pref pane in the installation.

After starting the server I set a password for user 'root', as described by the reference manual.

I am able to connect to the server just fine with "mysql -u root -p" and entering the root password.

However, once I am connected, I am unable to create a table in a new database. Here's the transcript:

mysql> create database helloworld;
Query OK, 1 row affected (0.01 sec)

mysql> use helloworld;
Database changed
mysql> create table hellotable (hellostring VARCHAR(20));
ERROR 1 (HY000): Can't create/write to file '/usr/local/mysql/data/helloworld/hellotable.MYI' (Errcode: 2)

I'm guessing that there is something wrong with the permissions of my /usr/local/mysql/data directory, such that the mysql user is not able to create the 'helloworld' directory. But if I list the directory and its permissions, they look right:

$ sudo ls -l /usr/local/mysql/
total 208
-rw-r--r-- 1 root wheel 17987 Aug 3 14:44 COPYING
-rw-r--r-- 1 root wheel 5139 Aug 3 14:44 EXCEPTIONS-CLIENT
-rw-r--r-- 1 root wheel 10955 Aug 3 14:44 INSTALL-BINARY
-rw-r--r-- 1 root wheel 62989 Aug 3 14:44 README
drwxr-xr-x 46 root wheel 1564 Aug 3 14:44 bin
drwxr-x--- 4 _mysql wheel 136 Aug 30 14:34 data
drwxr-xr-x 4 root wheel 136 Aug 3 14:43 docs
drwxr-xr-x 34 root wheel 1156 Aug 3 14:43 include
drwxr-xr-x 22 root wheel 748 Aug 30 14:34 lib
drwxr-xr-x 4 root wheel 136 Aug 3 14:43 man
drwxr-xr-x 15 root wheel 510 Aug 3 14:44 mysql-test
drwxr-xr-x 3 root wheel 102 Aug 3 14:44 scripts
drwxr-xr-x 35 root wheel 1190 Aug 3 14:44 share
drwxr-xr-x 29 root wheel 986 Aug 3 14:44 sql-bench
drwxr-xr-x 16 root wheel 544 Aug 3 14:44 support-files
$ sudo ls -l /usr/local/mysql/data/
total 0
drwxr-x--- 71 _mysql wheel 2414 Aug 30 14:34 mysql
drwxr-x--- 2 _mysql wheel 68 Aug 3 14:44 test

You can see that no 'helloworld' directory was created, despite the fact that the data/ directory is owned by _mysql with write permissions. Is it possible that the server is not actually running as setuid _mysql or something?

Thanks, and Best,
-Max

Viewing all articles
Browse latest Browse all 7239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>