My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
CreateDatabases  
*MOVED TO WIKI Setting up the databases for this project. See GettingStartedWithRails first.
Updated Apr 13, 2008 by medea...@gmail.com

Introduction

This assumes that you have gotten through GettingStartedWithRails for your operating system.

At this point, you should have successfully installed My SQL Server 5.0 on your system and started the server running. Once you have done that, now you need to actually create the database tables that our project will use.

Details

  • Type: mysql -u root
  • You should now be at a mysql> prompt. Type in the following commands, which will create the databases that will store data. We will create two sets of databases, one for the test application you will be making a little later on, and one for this project.
    • For your first Rails test application:
      • create database testing_development character set utf8;
      • create database testing_test character set utf8;
    • For this project:
      • create database otwdb_development character set utf8;
      • create database otwdb_test character set utf8;
    • To get out:
      • quit;

  • Make sure it worked. Back at the regular prompt, type:
  • mysqlshow -u root otwdb_development

You should see something vaguely like:
D:\My Documents\programming> mysqlshow -u root otwdb_development
Wildcard: otwdb_development
+-----------+
| Databases |
+-----------+
+-----------+

D:\My Documents\programming>

When You're Done

Now you need to install any necessary Rails plugins for this specific project.

Comment by sepe...@gmail.com, Feb 5, 2008

Mine says 'tables' not databases. -- jenn

Comment by meap...@gmail.com, Feb 6, 2008

Jenn, that's what you should be seeing.

The command "mysqlshow -u root" will show a listing of all the databases that you've created within MySQL on your computer (as the MySQL user "root").

Adding "otwdb_development" to the command specifies that you're interested in looking only at the database otwdb_development, and so it gives you a listing of all the tables you've created in that database.

Comment by shadowfa...@gmail.com, Feb 8, 2008

alt: do a SHOW DATABASES; before you QUIT; to see all your databases

Powered by Google Project Hosting