This book should be useful for anybody who uses MySQL, ranging from individuals who want to use a database for personal projects such as a blog or Wiki, to professional database and web developers. The book should also appeal to people who do not now use MySQL, but would like to. For example, it should be useful if you want to learn about databases but realize that a “big” database system such as Oracle isn’t the best choice as a learning tool.
If you’re relatively new to MySQL, you’ll probably find lots of ways to use it here that you hadn’t thought of. If you’re more experienced, you’ll probably be familiar with many of the problems addressed here, but you may not have had to solve them before and should find the book a great timesaver; take advantage of the recipes given in the book, and use them in your own programs rather than figuring out how to write the code from scratch.
The book also can be useful for people who aren’t even using MySQL. You might suppose that because this is a MySQL cookbook and not a PostgreSQL cookbook or an InterBase cookbook that it won’t apply to database systems other than MySQL. To some extent that’s true, because some of the SQL constructs are MySQL-specific. But many of the queries use standard SQL that is portable to many other database engines, so you should be able to use them with little or no modification. In addition, several programming language interfaces provide database-independent access methods; you use them the same way regardless of which type of database server you connect to.
The material ranges from introductory to advanced, so if a recipe describes techniques that seem obvious to you, skip it. Or if you find that you don’t understand a recipe, it may be best to set it aside for a while and come back to it later, perhaps after reading some of the preceding recipes.
More advanced readers may wonder on occasion why, in a book on
MySQL, I sometimes provide explanatory material on certain basic topics
that are not directly MySQL-related, such as how to set environment
variables. I decided to do this based on my experience in helping people
who are just getting started with MySQL. One thing that makes MySQL
attractive is that it is easy to use, which makes it a popular choice
for people without extensive background in databases. However, many of
these same people also tend to be thwarted by simple impediments to more
effective use of MySQL, as evidenced by the common question, “How
can I avoid having to type the full pathname of mysql each time I invoke it?”
Experienced readers will recognize immediately that this is simply a
matter of setting the PATH
environment variable to include the directory where mysql is installed. But other readers will
not, particularly Windows users who are used to dealing only with a
graphical interface and, more recently, Mac OS X users who find their
familiar user interface now augmented by the powerful but sometimes
mysterious command line provided by the Terminal application. If that
describes you, I hope that you’ll find these more elementary sections
helpful for knocking down barriers that keep you from using MySQL more
easily. If you’re a more advanced user, just skip over such
sections.
3.145.12.156