Ruby on Rails: Organic project: databases




4.1 Setting Database Setup:

The database server that will be used is MySQL server.
We have to create three databases named according to ROR 
conventions:
organics_development
organics_production
organics_test

We will create these three databases, a user and password for 
all of them, and  grant full read and write privileges. Here 
are the resultson a MySQL console:
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.4-beta-nt

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

mysql> create database organics_development;
Query OK, 1 row affected (0.05 sec)

mysql> grant all privileges on organics_development.* to
'root'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.14 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.11 sec)

mysql>
By repeating the same MySQL commands for the two remainig databases organics_production and molecules_test, we have things done. Issue the following command to make sure: mysql> create database organics_production; mysql> grant all privileges on organics_production.* to 'root'@'localhost' identified by 'success'; mysql> FLUSH PRIVILEGES; 5.3 mysql> create database organics_test; mysql> grant all privileges on organics_test.* to 'root'@'localhost' identified by 'success'; mysql> FLUSH PRIVILEGES; mysql> show databases; +-----------------------+ | Database | +-----------------------+ | information_schema | | organics_development | | organics_production | | organics_test | | mysql | | test | +-----------------------+ 11 rows in set (0.00 sec) mysql>