# Can't create/write to file '/usr/local/mysql/data/

**URL:** <https://www.ruby-forum.com/t/cant-create-write-to-file-usr-local-mysql-data/174071>\
**Category:** Rails\
**Created:** [August 20, 2009, 11:42am UTC](https://www.ruby-forum.com/t/cant-create-write-to-file-usr-local-mysql-data/174071 "2009-08-20T11:42:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RubyonRails\_newbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9d8465/32.png) [@RubyonRails\_newbie](https://www.ruby-forum.com/u/RubyonRails_newbie)\
**Post date:** [August 20, 2009, 11:42am UTC](https://www.ruby-forum.com/t/cant-create-write-to-file-usr-local-mysql-data/174071/1 "2009-08-20T11:42:00Z")

</div>

Hello there,

I am new to ruby on rails, and have followed a tutorial to get set up  
using mysql.

THis is now running, so using terminal, my next steps are to create a  
database, and a table for the database.

The dsatabase (addressbook) was successfully set up.

However, I’m getting an error when i try and create the table:

Can’t create/write to file ‘/usr/local/mysql/data/  
addressbook\_development/addresses.MYI’ (Errcode: 2)

Does anyone know how i set the permissions to allow for it to read  
this directory and allow the sql to generate the table?

Many Thanks in advance!

Cheers,
