"Rolling with Ruby" for Linux?

I'm finally getting around to trying out Rails and I'm using Curt Hibbs'
OnLamp article to get me going.

Problem is it's for Windows. The article refers to MySQLfront which
appears to be a Windows only program for setting up and maintaining the
database. I'm thinking that I probably need mysql_administrator in the
case of Linux so I downloaded it and tried it. So far I haven't been
able to connect to the database.

I downloaded MySQL for Linux and followed the installation instructions
and then started mysql_safe as indicated in the installation readme that
comes with mysql. But when I run MySQL administrator and try to log in I
keep getting a popup window that says "Could not connect to host
'localhost' MySQL Error Nr. 2002...".

I'm wondering if anyone has modified Curt's tutorial for use on Linux?

Phil

Have you tried the command-line client installed with MySQL?

$ mysql -u username -p

See if that gets you anywhere.

James Edward Gray II

···

On Apr 7, 2005, at 3:59 PM, Phil Tomson wrote:

I'm wondering if anyone has modified Curt's tutorial for use on Linux?

A great article, but I'm a bit surprised at the proportion of GUI
screenshots, it would have been nice to have create table sql/ddl
scripts instead/as well.

···

On Apr 8, 2005 6:59 AM, Phil Tomson <ptkwt@aracnet.com> wrote:

I'm finally getting around to trying out Rails and I'm using Curt Hibbs'
OnLamp article to get me going.

Problem is it's for Windows. The article refers to MySQLfront which
appears to be a Windows only program for setting up and maintaining the
database. I'm thinking that I probably need mysql_administrator in the
case of Linux so I downloaded it and tried it. So far I haven't been
able to connect to the database.

--
Into RFID? www.rfidnewsupdate.com Simple, fast, news.

* James Edward Gray II <james@grayproductions.net> [2005-04-08 06:24:31 +0900]:

···

On Apr 7, 2005, at 3:59 PM, Phil Tomson wrote:

>I'm wondering if anyone has modified Curt's tutorial for use on Linux?

Have you tried the command-line client installed with MySQL?

$ mysql -u username -p

See if that gets you anywhere.

James Edward Gray II

Or, try adding your machine to the list of allowed hosts
in the mysql table.

--
Jim Freeze
Code Red. Code Ruby

In article <139069fcdf21b1849ddfd7e0d20b85d0@grayproductions.net>,

I'm wondering if anyone has modified Curt's tutorial for use on Linux?

Have you tried the command-line client installed with MySQL?

$ mysql -u username -p

See if that gets you anywhere.

OK, that seems to be better. I get:

  Welcome to the MySQL monitor. Commands end with ; or \g.
  Your MySQL connection id is 2 to server version: 4.1.11-standard

  Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

  >

I've got to admit I've never used any kind of database before (hey, I've
hashes right? :). So I'm getting the idea that 'root' in this case (the
username I used above in the mysql command) is not the same as root on my
system - correct?

Also, now that I've got this mysql> commandline, I'm not quite sure what
to do next. Curt's tutorial talks about creating a new database called
'cookbook'. 'help' doesn't reveal a 'new' or 'add' command. I tried
'use cookbook' but of course it replies that it doesn't know about a
database called 'cookbook'.

Phil

···

James Edward Gray II <james@grayproductions.net> wrote:

On Apr 7, 2005, at 3:59 PM, Phil Tomson wrote:

Lyndon Samson wrote:

I'm finally getting around to trying out Rails and I'm using Curt Hibbs'
OnLamp article to get me going.

Problem is it's for Windows. The article refers to MySQLfront which
appears to be a Windows only program for setting up and maintaining the
database. I'm thinking that I probably need mysql_administrator in the
case of Linux so I downloaded it and tried it. So far I haven't been
able to connect to the database.

A great article, but I'm a bit surprised at the proportion of GUI
screenshots, it would have been nice to have create table sql/ddl
scripts instead/as well.

That was a conscious decision on my part. The idea was to bring those who were used to things like VB and MS Access. I figured people who preferred command line interfaces would have no problem figuring out what they needed to do.

Covering both ways of was not an option either. The article was already too long, and I actually had to cut things out to get it down to size.

Curt

···

On Apr 8, 2005 6:59 AM, Phil Tomson <ptkwt@aracnet.com> wrote:

In article <20050407213921.GA31058@freeze.org>,

···

Jim Freeze <jim@freeze.org> wrote:

* James Edward Gray II <james@grayproductions.net> [2005-04-08 06:24:31 +0900]:

On Apr 7, 2005, at 3:59 PM, Phil Tomson wrote:

>I'm wondering if anyone has modified Curt's tutorial for use on Linux?

Have you tried the command-line client installed with MySQL?

$ mysql -u username -p

See if that gets you anywhere.

James Edward Gray II

Or, try adding your machine to the list of allowed hosts
in the mysql table.

I figured out why mysql_administrator wouldn't connect. It was trying to
connect through a non-existant socket file at: /var/lib/mysql (somewhere
in there). The actual socket file was in /tmp/mysql.sock Now
mysql_administrator seems to be running OK.

Phil

Phil Tomson wrote:

In article <139069fcdf21b1849ddfd7e0d20b85d0@grayproductions.net>,

I'm wondering if anyone has modified Curt's tutorial for use on Linux?

Have you tried the command-line client installed with MySQL?

$ mysql -u username -p

See if that gets you anywhere.

OK, that seems to be better. I get:

  Welcome to the MySQL monitor. Commands end with ; or \g.
  Your MySQL connection id is 2 to server version: 4.1.11-standard

  Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

  >

I've got to admit I've never used any kind of database before (hey, I've hashes right? :). So I'm getting the idea that 'root' in this case (the username I used above in the mysql command) is not the same as root on my system - correct?

Also, now that I've got this mysql> commandline, I'm not quite sure what to do next. Curt's tutorial talks about creating a new database called 'cookbook'. 'help' doesn't reveal a 'new' or 'add' command. I tried 'use cookbook' but of course it replies that it doesn't know about a database called 'cookbook'.

Phil

Phil

  First, to create a database with the cli for mysql, type this at the command line:

create database <name>.

  Second - unfortunatly the CLI for mysql is a little dumb about where it puts it's help imho. When you are looking for help about SQL or pretty much any server side mysql stuff, start by typing

help contents

just typing help lists commands that the cli takes, not the db.

···

James Edward Gray II <james@grayproductions.net> wrote:

On Apr 7, 2005, at 3:59 PM, Phil Tomson wrote:

As an Access/VB developer, I can say I definitely liked the article.
I've bookmarked Part 2, and intend to study both these articles
further. To be honest, Ruby was nothing more than a mild curiosity to
me until I read about Rails. The idea of a simple, straightforward
web/database framework (to the uninitiated, it looks TOO simple to
work) has also piqued my interest in Ruby. I am attracted to the idea
of diving in and getting productive results fast, without cloistering
myself for years trying to fathom the (perceived) complexities of the
..NET-based web frameworks.

Right now, I am evaluating my current development platform and
practices, because I feel they aren't productive enough. I'm pretty
certain I will be doing .NET development in the future, but I don't
wholly buy the MS evangelism on the productivity of their platform (If
its so good, why isn't Longhorn on time and under-budget?)

Any comments/suggestions would be welcome.

-Ken

It took me a while, but after I got the mysql_administator tool running I
was able to get through the tutorial. (I actually had to learn a bit of
SQL to do it as well, which is probably a good thing.)

Nice article. And I can see why everyone is excited about RoR. I'm
hoping to put something together to track student grades for my TA job.

Phil

···

In article <42566613.5070404@hibbs.com>, Curt Hibbs <curt@hibbs.com> wrote:

Lyndon Samson wrote:

On Apr 8, 2005 6:59 AM, Phil Tomson <ptkwt@aracnet.com> wrote:

I'm finally getting around to trying out Rails and I'm using Curt Hibbs'
OnLamp article to get me going.

Problem is it's for Windows. The article refers to MySQLfront which
appears to be a Windows only program for setting up and maintaining the
database. I'm thinking that I probably need mysql_administrator in the
case of Linux so I downloaded it and tried it. So far I haven't been
able to connect to the database.

A great article, but I'm a bit surprised at the proportion of GUI
screenshots, it would have been nice to have create table sql/ddl
scripts instead/as well.

That was a conscious decision on my part. The idea was to bring those
who were used to things like VB and MS Access. I figured people who
preferred command line interfaces would have no problem figuring out
what they needed to do.