Showing posts with label command prompt. Show all posts
Showing posts with label command prompt. Show all posts

Saturday, April 28, 2007

Installing MySQL: Configuration

After installing MySQL I have to configure it. I have looked at both the MySQL Server Configuration Wizard Documentation and WebThang.co.uk's Tutorial for installing MySQL (I needed something a little less technical heavy to get me started and they've done a good job on tutorials).

When the window
this window
comes up I follow this sequence:
Next>Select Standard Configuration>Next>Next (Left Install As Windows Service and Launch the MySQL Server automatically on by default)>Entered my root password>Next>Execute>Finish

Now I test to see if it has been configured properly in good ol' Command Prompt
(Start>Programs>Accessories>Command Prompt)

I type in "c:/mysql/bin/mysql test" without the quotation marks on my prompt and...

then receive the following error message:
ERROR 1045 <28000>: Access denied for user 'ODBC'@'localhost'

I have no idea what this means. Going back to MySQL's "2.4.8.9. Starting the Server for the First Time" I see the suggestion to run mysqld.exe from the bin folder.

So I type in "c:/mysql/bin/mysqld. Instead of seeing a bunch of lines appear telling me something is being processed it quickly readies itself for the next prompt *blink blink*

Realizing my server is off I start Apache and attempt to run mysqld again. This time it waits for 5 or 6 seconds then readies itself for the next prompt without giving me any fanfare. It's supposed to give me fanfare. After reading 2.4.8.9 again I see that it will not show the lines I was expecting to see if I do not type "
--console" at the end of the command line. That last part was hidden in section navigation on the documentation page. Maybe they should make it a little more visible.

So I look in /mysql/data/MainFrame.err (it's where all the error messages and, if you don't enter --console, diagnostic messages go. Everything I expected to see in command prompt was there.

I logged into my account by changing the directory to c:/mysql/bin/
then entering mysql -u root password ****** in Command Prompt.

mysql - Mysql.exe, the program I'm opening
"-u" - means I'm about to enter the username
root - the ultimate grandmaster username upon installation
password - I entered a password on set up so I have to put password here if I'm going to access anything
****** - I can never tell (said in the voice of Jim Carrey's Riddler)

So I've got everything configured. Now...now...what am I going to do with all this stuff?

Hooray My MySQL is downloaded!

The moment of truth has arrived.

Before I even attempt installing it though I have to check the integrity of the file. To do this I am using md5.exe a program created by developed by Ron Rivest of the MIT Laboratory for Computer Science and RSA Data Security, Inc.

Md5 can validate the integrity of a downloaded file because the algorithm creates a different signature for two different files. If even one byte is changed in a file it will give a different signature. MySQL shows the signature id under the download link like so.


Hmm, I think I'll be uploading my pictures somewhere other than blogger. Is that blurred? Anyway, the second one is is what I downloaded. Below 5.037, 36.7M, etc there is a line that says MD5: b909c16... This is the line that md5.exe must return to show you have a file of pure integrity! (If only we could do the same for politicians, ahem) So the next step after downloading MySQL is to download MD5: Command Line Digest Utility.

After it has been downloaded it has to be unzipped (I'm assuming it was downloaded as a zip and not a tar. I use zips, never used tar). I simply unzipped it into c:/md5. I then placed the downloaded mysql-yada-yada-yada.zip in the c:/md5 folder along with md5.exe. Next we go to the command line.

In Microsoft XP, where they officially killed DOS, command prompt is used. It can be opened by following: Start>All Programs>Accessories>Command Prompt

If you've never used it don't worry it is actually quite simple (I used to have to use it every day because all I had was DOS long ago :-(!)

I started in the md5 directory but I wanted to show how change directory (cd\) works.
So I entered cd\ to return to c:\
Next I entered cd\md5 to change the directory to c:\md5
Then I entered md5 (it runs md5.exe) and entered the file name I want to check after it.
It returns a line, the signature for the downloaded file. I compare that line to the line on mysql's website and (no ellipse this time) they match!

On to installation!