<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    Chapter 3:  Tutorial Introduction 145 Some MySQL installations allow users to connect as the anonymous (unnamed) user to the server running on the local host.  If this is the case on your machine, you should be able to connect to that server by invoking mysql without any options: shell> mysql After you have connected successfully, you can disconnect any time by typing QUIT at the mysql>  prompt: mysql> QUIT Bye You can also disconnect by pressing Control-D. Most  examples  in  the  following  sections  assume  you  are  connected  to  the  server.   They indicate this by the mysql> prompt. 3.2  Entering Queries Make sure you are connected to the server, as discussed in the previous section.  Doing so will not in itself select any database to work with, but that's okay.  At this point, it's more important  to   nd  out  a  little  about  how  to  issue  queries  than  to  jump  right  in  creating tables, loading data into them, and retrieving data from them.  This section describes the basic principles of entering commands, using several queries you can try out to familiarise yourself with how mysql works. Here's a simple command that asks the server to tell you its version number and the current date.  Type it in as shown here following the mysql> prompt and press Enter: mysql> SELECT VERSION(), CURRENT_DATE; +--------------+--------------+ | VERSION() | CURRENT_DATE | +--------------+--------------+ | 3.22.20a-log | 1999-03-19 | +--------------+--------------+ 1 row in set (0.01 sec) mysql> This query illustrates several things about mysql:    A command normally consists of a SQL statement followed by a semicolon.  (There are some exceptions where a semicolon is not needed.   QUIT, mentioned earlier, is one of them.  We'll get to others later.)    When you issue a command, mysql sends it to the server for execution and displays the results, then prints another mysql> to indicate that it is ready for another command.    mysql  displays query output as a table (rows and columns).   The rst row contains labels for the columns.   The rows following are the query results.   Normally,  column labels are the names of the columns you fetch from database tables.  If you're retrieving the value of an expression rather than a table column (as in the example just shown), mysql  labels the column using the expression itself.    mysql  shows how many rows were returned and how long the query took to execute, which gives you a rough idea of server performance.  These values are imprecise because
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN REGISTRATION
    MANAGE YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    SITE MAP
    Home
    Hosting Plans | Domain Registration | About Us | Contact Us | Site Map
    Terms of Use | Privacy Policy | Guarantees
    Merchant Accounts

    SpiritHost - web hosting for spiritual and education sites
    SpiritHit.com - Religious and Spiritual Portal
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide