Running SQL statements with MySQLGUI

Running a query or other SQL statement is really quite simple with MySQLGUI. Simply type the query into the box as shown in Figure 8-40, using a simple query on the mysql database such as SELECT FROM user. Choose Execute 1 Save , L , . Clear Options tables query queiy 1 j Fuuiul 9 tables Info Figure 8-40 Executing SQL statements with MySQLGUI is easy, as shown by this simple query. You can choose of what you'd like to do with the results from the statement. Figures 8-36 through 8-39 show three...

SHOW GRANTS FOR

The SHOW GRANTS FOR lt user gt statement, which I refer to simply as SHOW GRANTS, enables you to find out quickly the privileges that a given user has on a server and the statements you would have to issue if you were to give that user those same privileges. For example, one task I am confronted with frequently is giving a user access to a new database system as new servers are implemented. The user almost always needs the same access as they have on the existing system. Using the SHOW GRANTS...

Normalization

Long the woe of many a college student learning database concepts, normalization is the practice of getting a database design into a format with no duplications or redundancy of data within the database so the database operates as efficiently as possible. This has obvious benefits of efficiency. However, it can also prevent catastrophic inconsistencies. There are five forms that a data model passes through on its way to being normalized. For our purposes, I'll deal with only the first three...

Installing MySQL on Windows 2000

Installation of MySQL on Windows 2000 is incredibly simple. MySQL AB has gone to great lengths to ensure a hassle-free installation process. The first step is to download the installation files or use the ones you can find on the CD-ROM with this book. The MySQL binary version for Windows is on the CD-ROM that accompanies this Once the files are downloaded or copied, you'll need a program such as WinZip to uncompress the installation files see Figure 4-13 . Double-click setup.exe to start MySQL...

Common command-line options for mysqld 2

The default server executable file for MySQL in Windows 2000 is called mysqld-nt. Some of the options you can set or call when you run mysqld-nt actually change the behavior of the server. In addition, many options can be set inside the my.ini file located in the WI NNT directory or sometimes in just the root directory . Note strongly recommend that you don't make a batch file or script to start MySQL instead, use the my . i ni file for changing the command-line behavior of MySQL. The my.ini...

The INSERT ... VALUES ... variation

The syntax for such an INSERT statement is INSERT LOW_PRIORITY DELAYED IGNORE INTO tbl_name col_name,... VALUES expression,... , ... ,... I ve already given a couple examples using this syntax. At the most basic level, the syntax for this variation of the INSERT statement is INSERT INTO lt tablename gt VALUES lt expression gt , ... To facilitate examples that appear later in this chapter, I insert some sample data for two of the tables in the ecommerce database and into additional tables by...

MySQL Linux Source Installation

The most configurable and complicated of the install types for MySQL is an installation from source code. This method requires you to compile the server directly and therefore is not for everyone. However, with a source-code install You have the most control over the components installed. You can edit or modify the source code to fit your installation. The source code for MySQL for Linux on Intel x86 systems is contained on the CD included with this book. The source code will be compressed and...

Introducing the CLI

Before the advent of GUIs and third-party tools, the MySQL CLI provided the only way to interact with the database. However the CLI offers advantages over some of its newer counterparts insofar as it is tested and stable, it is lightweight, and it comes standard with most installations of MySQL. The basic syntax for to use the MySQL CLI is as follows The options for this command help make the MySQL CLI configurable as well as powerful. Should you forget the options and not have this book...

MySQL for Windows

MySQL with Windows in binary version runs on Windows 95, 98, Me, NT, and 2000. The binary version includes the regular MySQL server as well as the MySQL-MAX server that includes transactional tables. If your work requires the server to support transactional tables, the command line that starts MySQL is different. Therefore, if you don t need transactional-table support, I recommend staying with the normal MySQL server it uses fewer resources. Table 2-5 shows the MySQL exe-cutables for Windows....