20070305a

From Wsms

Jump to: navigation, search

previous next
GO TO:
Parent class notes: MySQL class notes
Angelica's complementary notes



Monday March 05 2007

MySQL

MySQL is like Oracle and DB2. It uses SQL.

I'm working for the MySQL Tutorial book by Welling and Thomson, see MySQL Tutorial. There is also excellent online documentation at http://dev.mysql.com/doc/refman/5.1/en/index.html.

This is off-topic, but it looks like it might be useful. HOWTO provide Microsoft Access-like functionality on Linux with open-source tools - OpenOffice.org 1.0, unixODBC, and MySQL: http://www.unixodbc.org/doc/OOoMySQL9.pdf.

Joe gave us a talk on relational database history and theory.

Entity-relationship diagrams are a key concept. You can draw nice ER diagrams using Visio.

Joe's lecture was pretty similar to the information in http://www.geekgirls.com/databasics_02.htm. The main difference is that that tutorial implements the database in access and FileMaker whereas we will be using MySQL.

Other links on database design:
http://en.wikipedia.org/wiki/Database_normalization
http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html

Many-to-many relationships are a problem. There is no good, trivial way to deal with them. What you have to do is create and intermediate table.

Then Joe talked about normalization. The third rule is that you can't have column in a table that depends solely on the contents of another column in the same column.


MySql Server/Client architecture

The default port for the MySql server is 3306.

Install MySQL on the virtual machine server running Windows 2003 server

I used rdesktop from Linux to control my VM. Joe wants us to install MySQL on our Window XP machines. I actually did both. The steps are the same.

rdesktop -g 800x600 -a 16 -u Administrator -p P@ssw0rd 10.101.21.x

You should have the same login, but a different IP address.

The file we need are on the SharePoint server: http://209.129.16.203/webserver

I made the file available at http://rop.ncc.sdccd.net/~georgeg/downloads/mysql-5.0.27-win32.zip

After you downlod the zip file, open it and drag the contained .exe file to your desktop:

Image:20070305-01130-extract-exe.png

When you run the installer, the first window is the welcome secreen.

Image:20070305-01140-welcome.png

We use a typical setup
Image:20070305-01150-setup-type.png

We use the default install location
Image:20070305-01160-install-location.png

Then we get to wait.
Image:20070305-01170-wait.png

We decline the chance to join MySQL mailing lists.
Image:20070305-01190-skip-sign-up.png

Tell it to configure now.
Image:20070305-01200-configure-now.png

Moving right along, we start to confgure the server instance.
Image:20070305-01210-server-instance-config.png

We have to use the detailed configuration.
Image:20070305-01220-detailed-configuration.png

We set it up as a developer machine.
Image:20070305-01230-developer-machine.png

Accept the default for the innodb tablespace location.
Image:20070305-01240-innodb-tablespace.png

Use a manual setting with a max of 5 connections.
Image:20070305-01260-manual-setting.png

Accept the default port number and enable the scrict mode.
Image:20070305-01270-port-number.png

Use the standard character set.
Image:20070305-01280-standard-charset.png

Be sure to include the bin directory in the Windows path.
Image:20070305-01290-include-bin.png

Set the root password to P@ssw0rd. Don't allow remote root access.
Image:20070305-01300-root-password.png

Start the configuration.
Image:20070305-01310-start-configuration.png

Oops. Port 3306 needs to be opened.
Image:20070305-01320-firewall-error.png

Use the Windows firewall control panel.
Image:20070305-01321-windows-firewall.png

Then you see the Windows Firewall Dialog.
Image:20070305-01322-windows-firewall-dialog.png

Click on the exceptions tab.
Image:20070305-01323-exceptions-tab.png

Click on the Add Port button. Add the exception for MySQL on port 3306.
Image:20070305-01324-edit-a-port.png

Click on OK.
Image:20070305-01325-exceptions-tab2.png

Click on OK. Then click Retry in the firewall-error dialog. We finally get to finish the configuration.
Image:20070305-01330-process-configuration.png
Click Finish.
Open a command window and test to see that MySQL works.
Image:20070305-01340-mysql-use.png

Personal tools