• Home
  • About Me
  • Musings
  • Programming
  • Open Source
  • Computers
  • Society
  • Books
  • Design
  • Movies
  • Rails: Error with MySQL in welcome screen

    Posted on April 14th, 2009 by Rajeshwaran S P

    After installing rails, to test it, I created a rails application using the following command at the command prompt.

    1
    
    rails -d mysql todolist

    Pointing to http://localhost:3000 displayed the expected Welcome message.

     

    Welcome Message

    Welcome Message

    But then clicking on the About your application’s environment displayed a error message like below.

     

    Error in Rails

    Error in Rails

    That’s the least thing I expected. Digging into the development.log file located in the project log directory, displayed the actual error message, “Client does not support authentication protocol requested by server; consider upgrading MySQL client”.

    Looking into the web for help, the problem with the way rails (as a client) was trying to access MySQL server. Rails uses a old password hashing used in MySQL 4.1, and the current version that I am running is MySQL 5.0. This had caused the error. The fix is running the following script in mysql prompt.

    1
    
    mysql> SET PASSWORD FOR 'railsuser'@'host' = OLD_PASSWORD('password');

    That fixes it and you would get the following screen.

    Success message

    Success message

    Possibly Related posts:

    1. Uninstalling MySQL on Mac OS X Here are the steps to perform a clean un-install of...
    2. Rails Installation Installing Rails needs a lot of patience. The command is...
    3. Fixing libmysql.dll issue in Rails To fix the error, “This application has failed to start...
    4. Installing Rails : Local gem install After a unsuccessful installation of rails that took nearly 5...
    5. Continuous Integration with CruiseControl.Net I had challenges in understanding the documentation for installing and...

    Tags: , ,

    Leave a Reply