Forum: Ruby on Rails Re: can't get rails to connect to mySQL - HELP!!!!!!!!!

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1744718eb0f1f4c8ec88d8560ad2409c?d=identicon&s=25 Lurlay, Patrick (Guest)
on 2006-03-02 22:05
(Received via mailing list)
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
This topic is locked and can not be replied to.