Its 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 practising the material covered in this book,
but to keep things sensible, we’ll assume you’re using one of the big three just listed. Where the process varies between operating systems, 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 book. For example, many of the Linux instructions can be used with little
adaptation on Solaris orFreeBSD.
To install a MySQL server with the standard directories and settings fora 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 access. The superuser can do anything on a system, so you might be tempted to always login 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 beset 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.
Share with your friends: