Tutorial; Connecting To And Disconnecting From The Server - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

Chapter 3. Tutorial
Table of Contents
3.1. Connecting to and Disconnecting from the Server ................................................................ 193
3.2. Entering Queries ................................................................................................................ 194
3.3. Creating and Using a Database .......................................................................................... 197
3.3.1. Creating and Selecting a Database .......................................................................... 198
3.3.2. Creating a Table ...................................................................................................... 199
3.3.3. Loading Data into a Table ........................................................................................ 200
3.3.4. Retrieving Information from a Table .......................................................................... 201
3.4. Getting Information About Databases and Tables ................................................................. 213
3.6. Examples of Common Queries ........................................................................................... 216
3.6.1. The Maximum Value for a Column ........................................................................... 216
3.6.2. The Row Holding the Maximum of a Certain Column ................................................. 216
3.6.3. Maximum of Column per Group ............................................................................... 217
3.6.5. Using User-Defined Variables ................................................................................... 218
3.6.6. Using Foreign Keys ................................................................................................. 218
3.6.7. Searching on Two Keys ........................................................................................... 220
3.6.8. Calculating Visits Per Day ........................................................................................ 220
3.6.9. Using
3.7. Using MySQL with Apache ................................................................................................. 222
This chapter provides a tutorial introduction to MySQL by showing how to use the
program to create and use a simple database.
or just "monitor") is an interactive program that enables you to connect to a MySQL server, run
queries, and view the results.
beforehand, then tell
here.
To see a list of options provided by mysql, invoke it with the
shell>
mysql --help
This chapter assumes that
to which you can connect. If this is not true, contact your MySQL administrator. (If you are the
administrator, you need to consult the relevant portions of this manual, such as
Server
Administration.)
This chapter describes the entire process of setting up and using a database. If you are interested only
in accessing an existing database, you may want to skip over the sections that describe how to create
the database and the tables it contains.
Because this chapter is tutorial in nature, many details are necessarily omitted. Consult the relevant
sections of the manual for more information on the topics covered here.

3.1. Connecting to and Disconnecting from the Server

To connect to the server, you will usually need to provide a MySQL user name when you invoke
and, most likely, a password. If the server runs on a machine other than the one where you log in,
you will also need to specify a host name. Contact your administrator to find out what connection
parameters you should use to connect (that is, what host, user name, and password to use). Once you
know the proper parameters, you should be able to connect like this:
in Batch Mode ............................................................................................... 214
......................................................................................... 220
may also be used in batch mode: you place your queries in a file
mysql
to execute the contents of the file. Both ways of using
mysql
is installed on your machine and that a MySQL server is available
mysql
(sometimes referred to as the "terminal monitor"
mysql
--help
193
client
mysql
are covered
mysql
[265]
option:
Chapter 5, MySQL
mysql

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Mysql 5.0

Table of Contents