How do you start mySQL under InstantRails?

Hi Tom,

Without a little more info, I'm not sure how to direct you. MySQL should start when you start IR.exe. Plz say more.

Best regards, Bill

The command 'mysql' which you entered is the client, not the server. If you were able to login using 'mysql -u root' then it means that the server is starting correctly. Only the MySQL server is loaded when InstantRails starts, not the client, as the client is not used by Rails.

Yes, before running a Rails program you should login to MySQL as the user who 'owns' the database for that program, and then enter the command 'USE databasename;' where databasename is the name of the database for the program.

There was nothing to connect to. The mysql server was down, it's like trying to load a page in firefox when the server on the other end is down: error 404. Once the mysql server was up and running then rails can connect to it :slight_smile:

-Thufir

There's a MySQL group for a better explanation, but...

Think of of a web server, be it mongrel, webrick or apache. That web server must be started, yes? Similarly, there's a mySQL server which must be started. If mongrel/webrick isn't running, then going to localhost:3000 will give "page cannot be displayed", right? You're getting the same thing, but from the MySQL server.

I forget, are you using Linux or Windows? In GNOME for Linux, I can navigate to System > Administration > Services then enter my root password and turn on the mysql "service". Alternately, from the command line:

arrakis ~ # arrakis ~ # /etc/init.d/mysql stop * Stopping mysql ... * Stopping mysqld (0)
[ ok ] arrakis ~ # arrakis ~ # /etc/init.d/mysql start * Starting mysql ... * Starting mysql (/etc/mysql/ my.cnf) [ ok ] arrakis ~ # arrakis ~ # /etc/init.d/mysql restart * Stopping mysql ... * Stopping mysqld (0)
[ ok ] * Starting mysql ... * Starting mysql (/etc/mysql/ my.cnf) [ ok ] arrakis ~ #

-Thufir

Tom Dellaringa wrote in post #595906:

Bill Walton wrote:

Hi Tom,

Without a little more info, I'm not sure how to direct you. MySQL should start when you start IR.exe. Plz say more.

Thanks, I'm not sure what else to provide, but what I finally did was this:

C:\InstantRails\mysql\bin>mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 5.0.27-community

Then tried to go to my page, and it finally worked.

I guess it wanted to know I was the root user? I thought it was supposed to start at startup as you say.

Thanks The above method perfectly connects with mysql.