Re: can't get rails to connect to mySQL - HELP!

This insturction assumes that you are using mysql 5.x

  1. login to mysql as admin user
  2. use myslq;
  3. create database depot_test;
  4. —create new user for your db

insert into user(Host,User,Password, insert_priv, update_priv,
create_priv, select_priv, delete_priv, drop_priv, ssl_cipher,
x509_issuer, x509_subject)
values(“localhost”,“jdoe”,Password(‘jdoe’), “Y”, “Y”, “Y”, “Y”, “Y”,
“Y”, “Y” ,“Y”, “Y”);
5. flush privileges;
6. grant select,create,update,drop,delete,insert on depot_test.* to
jdoe@localhost identified by ‘jdoe’;
7. use depot_test;
8. go ahead and create your tables-----)

9 configure your database.yml to look like below:

adapter: mysql
database: depot_test
username:jdoe
password:jdoe
#socket: /path/to/your/mysql.sock

Cheers

Patrick