Online Book Reader

Home Category

MariaDB Crash Course - Ben Forta [88]

By Root 444 0
from having complete and unfettered access to all the server has to offer.

* * *

Regardless of whether you use a local server, you need client software (the program you use to actually run SQL commands). The most readily available is the mysql command line utility (included with every MariaDB installation). Another important utility is the MySQL Workbench.

Obtaining the Software


To learn more about MariaDB, go to http://mariadb.org/.

To download a copy of the server, go to http://maraiadb.org/downloads/.

It is recommended that you download and install the newest version of MariaDB (usually the first option listed). You are presented with a list of download options for various computer platforms and operating systems.

Unlike the command line mysql utility, MySQL Workbench is not included with MariaDB. Instead, it must be downloaded from http://wb.mysql.com/.

Installing the Software


If you are installing a local MariaDB server, do so before installing any other clients or utilities. The installation procedure varies from platform to platform, but all installations prompt you for needed information, including

• Installation location (the default is usually fine).

• Password for root user. (If you are not prompted for a root password then there will be no root password set.)

• Ports, service or process names, and more. As a rule, use default values if you are unsure of what to specify.

* * *

Tip: Multiple MariaDB Servers

Multiple copies of MariaDB server may be installed on a single machine, as long as each uses a different port.

* * *

* * *

Note: Important Note for Windows Users

When running MariaDB on Windows you want the MariaDB server to be running as a system service. If you are installing MariaDB 5.2.6 or later, the service will be created for you as part of the installation process. For earlier versions of MariaDB, you need to do this manually. Fortunately, this is simple to do. Open a command prompt window (you can do this by clicking Start, Run; typing cmd; and then clicking OK) and then go to the bin folder under the MariaDB installation folder. In that folder type mysqld --install and press Enter. You should see a message telling you that the service was created.

* * *

Preparing to Try It Yourself


After you have installed MariaDB, Chapter 3, “Working with MariaDB,” shows you how to log in and log out of the server, and how to execute commands.

The chapters in this book all use real SQL statements and real data. Appendix B, “The Example Tables,” describes the example tables used in this book, and explains how to obtain and use the table creation and population scripts.

Appendix B. The Example Tables

Writing SQL statements requires a good understanding of the underlying database design. Without knowing what information is stored in what table, how tables are related to each other, and the actual breakup of data within a row, it is impossible to write effective SQL.

You are strongly advised to actually try every example in every chapter in this book. All the chapters use a common set of data files. To assist you in better understanding the examples and to enable you to follow along with the chapters, this appendix describes the tables used, their relationships, and how to obtain them.

Understanding the Sample Tables


The tables used throughout this book are part of an order entry system used by an imaginary distributor of paraphernalia that might be needed by your favorite cartoon characters (yes, cartoon characters; no one said that learning MariaDB needed to be boring). The tables are used to perform several tasks:

• Manage vendors

• Manage product catalogs

• Manage customer lists

• Enter customer orders

Making this all work requires six tables that are closely interconnected as part of a relational database design. A description of each of the tables appears in the following sections.

* * *

Note: Simplified Examples

The tables used here are by no means complete. A real-world order entry system would have to keep track of a lot of other

Return Main Page Previous Page Next Page

®Online Book Reader