Databases Reference
In-Depth Information
It's not common to find a production MySQL server running on OS X, but it's a good
environment for learning MySQL.
So, What Should I Do?
As we mentioned earlier, you can use almost any major operating system when prac-
tising the material covered in this topic, but to keep things sensible, we'll assume you're
using one of the big three just listed. Where the process varies between operating sys-
tems, we'll clearly explain the necessary steps. It shouldn't be too hard to interpret the
instructions for other operating systems that we don't focus on in this topic. For ex-
ample, many of the Linux instructions can be used with little adaptation on Solaris or
FreeBSD.
To install a MySQL server with the standard directories and settings for a system-wide
installation, you'll generally need superuser (also known as the system root user or
administrator ) privileges on your system. Always be careful when using superuser ac-
cess. The superuser can do anything on a system, so you might be tempted to always
log in under the superuser account. However, “anything” means anything —including
accidentally deleting vital system files and making the system unusable. There are also
security risks associated with using this level of access by default, so we strongly suggest
you stick to an ordinary, or nonprivileged , user account and switch to the privileged
account only when necessary. We'll explain how to configure a MySQL server installed
on a Linux or Mac OS X system to run as a less privileged user; any files and directories
that the server creates are then owned by this account.
If you don't have superuser access—for example, you're using a shared university
computer or want to experiment without touching the system-wide MySQL installation
—you can generally install a local MySQL server using nonstandard settings; we'll also
explain how you can do this. However, we recommend that you go with the default
settings if you can, at least while you're still learning a lot about MySQL. You're far
less likely to make mistakes, and less likely to run into difficulties with the software;
programs are rarely tested as well on nonstandard configurations as they are on the
default settings.
Finally, there are cases when the database server may already be set up for you. Many
hosting companies, for example, allow you to administer your databases using only a
web-based MySQL client such as phpMyAdmin. We'll take a brief look at phpMyAd-
min in Chapter 13.
Using the Command-Line Interface
The three operating systems we use in this topic all have graphical user interfaces; you
can start programs by clicking on icons, you can select tasks from menus, and you can
drag and drop files and folders. However, once you start to use more powerful aspects
of the operating system and applications, you'll quickly find that some tasks are more
 
Search WWH ::




Custom Search