Link to mysql.sock deleted at reboot

I'm on Mac OS 10.5. How do I get a link from /tmp/mysql.sock to /opt/.../mysql.sock to stay after reboot?

Is there a better way of doing this, like adding an alias in .profile if possible, or is it assumed that you never reboot your machine? :slight_smile:

Why don't you use the socket option in database.yml to point to opt/... ? You can use this setting for development and another for production. Alternatively create database.mymachine.yml and database.production.yml and link the right file to database.yml

Mukund wrote:

Why don't you use the socket option in database.yml to point to opt/... ? You can use this setting for development and another for production. Alternatively create database.mymachine.yml and database.production.yml and link the right file to database.yml

On Nov 12, 12:16�pm, P�l Bergstr�m <rails-mailing-l...@andreas-s.net>

I could do that, but it's convenient to use /tmp/mysql.sock as other programs look there first.

Mukund wrote:

Why don't you use the socket option in database.yml to point to opt/... ? You can use this setting for development and another for production. Alternatively create database.mymachine.yml and database.production.yml and link the right file to database.yml

On Nov 12, 12:16�pm, P�l Bergstr�m <rails-mailing-l...@andreas- s.net>

I could do that, but it's convenient to use /tmp/mysql.sock as other programs look there first.

Presumably you can configure mysql to put its socket in /tmp rather
than in /opt/...

Fred

Frederick Cheung wrote:

Here are a couple of articles I used to help me get Rails & MySql running on Leopard.

hth,

Craig

Pål Bergström wrote:

I'm on Mac OS 10.5. How do I get a link from /tmp/mysql.sock to /opt/.../mysql.sock to stay after reboot?

Is there a better way of doing this, like adding an alias in .profile if possible, or is it assumed that you never reboot your machine? :slight_smile:   

This might do what you want with the values you want in it:

# recipe 25 from "rails recipes"