Koozali.org: home of the SME Server

Ruby on Rails database population problems

Offline fixit

  • *
  • 216
  • +0/-0
    • http://www.fixitcomputers.com.au
Ruby on Rails database population problems
« on: August 18, 2007, 04:08:31 AM »
I am having trouble creating a database for an ruby on rails app (Metadot 7)

Access denied for user 'root'@'localhost' (using password: NO)

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

it appears no matter how i try and create the database, the result is always the same, is there some security feature that is enabled

if any one is interested in trying metadot 7 beta, you can download  from

http://download.metadot.com/v7/


username: metadotRails
password: tr4nzf0rm3rz

Russell


.........

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: Ruby on Rails database population problems
« Reply #1 on: August 18, 2007, 06:14:19 AM »
Don't ever use "root" to let applications access MySQL.  You need to create a separate user for your ruby application.  See this section in the wiki about MySQL.

http://wiki.contribs.org/MySQL
In life, you must either "Push, Pull or Get out of the way!"

Offline fixit

  • *
  • 216
  • +0/-0
    • http://www.fixitcomputers.com.au
Re: Ruby on Rails database population problems
« Reply #2 on: August 18, 2007, 06:44:23 AM »
I don't use root

the commands that i am using are

mysqladmin create mwiki

mysql -e "grant all privileges on mwiki.* to mwikiuser@localhost identified by 'thepassword'"

and i get this error message when i ran the install script

Access denied for user 'root'@'localhost' (using password: NO)

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

are there any other database connectors for ruby top connect to mysql
.........

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: Ruby on Rails database population problems
« Reply #3 on: August 18, 2007, 08:21:07 AM »
Then the script is trying to use root to populate the database and this will be difficult as the password for root is a randomly set 76 character password.  Most install scripts have a place where you input the database information.  Does the script allow you to input a username, password, etc?

If so, you need to input the fields something like this:
database type: MySQL
host: localhost
database: mwiki
username: mwikiuser
password: thepassword

If not, then you need to edit the script so that it uses "mwikiuser" as the user, "thepassword" as the password and "mwiki" as the database.
In life, you must either "Push, Pull or Get out of the way!"