You are on page 1of 9

Appendix B.

MySQL installation

Table of Contents

Appendix B. MySQL installation.................................................................. 1


Section B.1. Get started, fast!.......................................................................................................................................................... 2
Section B.2. Instructions and Troubleshooting.............................................................................................................................. 2
Section B.3. Steps to Install MySQL on Windows.......................................................................................................................... 3
Section B.4. Steps to Install MySQL on Mac OS X......................................................................................................................... 6

Appendix B. MySQL installation


Head First SQL By Lynn Beighley ISBN: 9780596526849 Publisher: O'Reilly Prepared for Gareth Morris, Safari ID: northwind001@gmail.com
Print Publication Date: 2007/08/15 User number: 810998 Copyright 2007, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
Appendix B. MySQL installation Page 1 Return to Table of Contents

appendix ii: MySQL installation

Try it out for yourself

:KRNQHZWKHUHZDVDQ
HQWLUH5'%06GRZQKHUH"
,PD\QHYHUFRPHEDFNXS

All your new SQL skills won’t do you much good


without a place to apply them. This appendix contains
instructions for installing your very own MySQL RDBMS for you to work with.

this is an appendix 543

Appendix B. MySQL installation


Head First SQL By Lynn Beighley ISBN: 9780596526849 Publisher: O'Reilly Prepared for Gareth Morris, Safari ID: northwind001@gmail.com
Print Publication Date: 2007/08/15 User number: 810998 Copyright 2007, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
Appendix B. MySQL installation Page 2 Return to Table of Contents

try out MySQL for yourself

Get started, fast!


Because it’s no fun to have a book on SQL without being able to try it out for
yourself, here’s a brief introduction to installing MySQL on Windows and Mac
OS X.

NOTE: This section covers Windows 2000, XP, or Windows


Server 2003, or other 32-bit Windows operating system.
For Mac, it applies to Mac OS X 10.3.x or newer.

Copyright Safari Books Online #810998


We’ll take you through the downloading and installing of MySQL. The official
name for the free version of the MySQL RDBMS server these days is
MySQL Community Server.

Instructions and Troubleshooting


The following is a list of steps for installing MySQL on Windows and Mac OS X.
This is not meant to replace the excellent instructions found on the MySQL web
site, and we strongly encourage you to go there and read them! For much
more detailed directions, as well as a troubleshooting guide, go here:

Get version 5.0 or new


er.
http://dev.mysql.com/doc/refman/5.0/en/windows-installation.html

You’ll also like the MySQL Query Browser we talked about on pages 526–527.
There, you can type your queries and see the results inside the software interface,
rather than in a console window.

544 Appendix ii

Appendix B. MySQL installation


Head First SQL By Lynn Beighley ISBN: 9780596526849 Publisher: O'Reilly Prepared for Gareth Morris, Safari ID: northwind001@gmail.com
Print Publication Date: 2007/08/15 User number: 810998 Copyright 2007, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
Appendix B. MySQL installation Page 3 Return to Table of Contents

MySQL installation

Steps to Install MySQL on Windows


1 Go to:
http://dev.mysql.com/downloads/mysql/5.0.html
and click on the MySQL Community Server download button.

You may have to scroll


down a little.

Get version 5.0


or newer.

2 Choose Windows from the list.


The top one!

you are here  545

Appendix B. MySQL installation


Head First SQL By Lynn Beighley ISBN: 9780596526849 Publisher: O'Reilly Prepared for Gareth Morris, Safari ID: northwind001@gmail.com
Print Publication Date: 2007/08/15 User number: 810998 Copyright 2007, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
Appendix B. MySQL installation Page 4 Return to Table of Contents

installing MySQL on windows

Download your installer


3 Under Windows downloads, we recommend that you choose the
Windows ZIP/Setup.EXE option because it includes an installer that
greatly simplifies the installation. Click on Pick a Mirror.

Make sure
you pick the
.EXE option.

4 You’ll see a list of locations that have a copy you can download; choose the
one closest to you.
5 When the file has finished downloading, double-click to launch it. At this
point, you will be walked through the installation with the Setup Wizard.
Click the Next button.

When you’ve double-clicked the


file and the Setup Wizard dialog
appears, click the Next button.

546 Appendix ii

Appendix B. MySQL installation


Head First SQL By Lynn Beighley ISBN: 9780596526849 Publisher: O'Reilly Prepared for Gareth Morris, Safari ID: northwind001@gmail.com
Print Publication Date: 2007/08/15 User number: 810998 Copyright 2007, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
Appendix B. MySQL installation Page 5 Return to Table of Contents

MySQL installation

Pick a destination folder


6 You’ll be asked to choose Typical, Complete, or Custom. For our purposes
in this book, choose Typical.
You can change the location on your computer where MySQL will be
installed, but we recommend that you stay with the default location:
C:\Program Files\MySQL\MySQL Server 5.0
Click the Next button.

Click “Install” and you’re done!


7 You’ll see the “Ready to Install” dialog with the Destination Folder listed.
If you’re happy with the destination directory, click Install. Otherwise, go
Back, Change the directory, and return here.
Click Install.

you are here  547

Appendix B. MySQL installation


Head First SQL By Lynn Beighley ISBN: 9780596526849 Publisher: O'Reilly Prepared for Gareth Morris, Safari ID: northwind001@gmail.com
Print Publication Date: 2007/08/15 User number: 810998 Copyright 2007, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
Appendix B. MySQL installation Page 6 Return to Table of Contents

installing MySQL on Mac OS X

Steps to Install MySQL on Mac OS X


If you are running Mac OS X Server, a version of MySQL should
already be installed.
Before you begin, check to see if you already have a version installed.
Go to Applications/Server/MySQL Manager to access it.

1 Go to:
http://dev.mysql.com/downloads/mysql/5.0.html
and click on the MySQL Community Server download button.

You may have to


scroll down a bit.

548 Appendix ii

Appendix B. MySQL installation


Head First SQL By Lynn Beighley ISBN: 9780596526849 Publisher: O'Reilly Prepared for Gareth Morris, Safari ID: northwind001@gmail.com
Print Publication Date: 2007/08/15 User number: 810998 Copyright 2007, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
Appendix B. MySQL installation Page 7 Return to Table of Contents

MySQL installation

2 Choose Mac OS X (package format) from the list.

You’ll have to scroll


down to get to it!

3 Choose the appropriate package for your Mac OS X version.


Click on Pick a Mirror.

4 You’ll see a list of locations that have a copy you can download; choose the
one closest to you.

5 When the file has finished downloading, double-click to launch it. When you’ve
installed MySQL, go look at the online documentation for how to access your install
using the query browser we talked about on pages 526–527.
But if you’re in a hurry, here’s a quick way in using the Terminal.
You can now open a Terminal window on your Mac and type:
shell> cd /usr/local/mysql
shell> sudo ./bin/mysqld_safe
(Enter your password, if necessary)
(Press Control-Z)
shell> bg
(Press Control-D or enter exit to exit the shell)

you are here  549

Appendix B. MySQL installation


Head First SQL By Lynn Beighley ISBN: 9780596526849 Publisher: O'Reilly Prepared for Gareth Morris, Safari ID: northwind001@gmail.com
Print Publication Date: 2007/08/15 User number: 810998 Copyright 2007, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.

You might also like