I need to do some major web design work, so I’m trying to decide how I’m going to tackle the project. I want to use a database and other dynamic stuff, so I was thinking that I’d use php and mysql. But after reading some webpages, I think I’m going to try to learn about Ruby on Rails. It’s more complicated to start off, but should do lots more of the things that I want. So, to get started, I’m loading it on my mac. First step is to load Xcode, then I have to fix the version of ruby that comes with the mac.

I followed the instructions here:

http://hivelogic.com/narrative/articles/ruby_rails_lighttpd_mysql_tiger

Set up my first project with:

rails /Users/maryh/work/ruby/test1
cd /Users/maryh/work/ruby/test1
ruby script/server

If I then open my browser to localhost:3000, it looks to have worked. Now I need to figure out what I can do with ruby.

At some point, I installed mysql on my mac. I need to change the default password to something.

yo:~/work/ruby/test1 maryh$ /usr/local/mysql/bin/mysqladmin -u root password 'new_password'
yo:~/work/ruby/test1 maryh$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 245 to server version: 5.0.27-standard

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

mysql> show databases
    -> ;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| mysql              | 
| test               | 
+--------------------+
3 rows in set (0.00 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select Host,User,Password from user where Password='';
+-----------------+------+----------+
| Host            | User | Password |
+-----------------+------+----------+
| yo.uchicago.edu | root |          | 
| yo.uchicago.edu |      |          | 
| localhost       |      |          | 
+-----------------+------+----------+
3 rows in set (0.00 sec)

mysql> delete from user where Password='';
Query OK, 3 rows affected (0.00 sec)

That gets rid of the accounts that have no password.