<< 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 149 | test | | tmp | +----------+ The  list  of  databases  is  probably  di erent  on  your  machine,  but  the  mysql  and  test databases  are  likely  to  be  among  them.   The  mysql  database  is  required  because  it  de- scribes user access privileges.  The test database is often provided as a workspace for users to try things out. Note that you may not see all databases if you don't have the SHOW DATABASES privilege. See Section 4.3.1 [GRANT], page 212. If the test database exists, try to access it: mysql> USE test Database changed Note that USE, like QUIT, does not require a semicolon.  (You can terminate such statements with a semicolon if you like; it does no harm.)  The USE statement is special in another way, too:  it must be given on a single line. You can use the test database (if you have access to it) for the examples that follow, but anything you create in that database can be removed by anyone else with access to it.  For this reason,  you should probably ask your MySQL administrator for permission to use a database of your own.  Suppose you want to call yours menagerie.  The administrator needs to execute a command like this: mysql> GRANT ALL ON menagerie.* TO your_mysql_name; where your_mysql_name is the MySQL user name assigned to you. 3.3.1  Creating and Selecting a Database If the administrator creates your database for you when setting up your permissions, you can begin using it.  Otherwise, you need to create it yourself: mysql> CREATE DATABASE menagerie; Under Unix, database names are case-sensitive (unlike SQL keywords), so you must always refer to your database as menagerie, not as Menagerie, MENAGERIE, or some other variant. This is also true for table names.  (Under Windows, this restriction does not apply, although you must refer to databases and tables using the same lettercase throughout a given query.) Creating  a  database  does  not  select  it  for  use;  you  must  do  that  explicitly.    To  make menagerie the current database, use this command: mysql> USE menagerie Database changed Your  database  needs  to  be  created  only  once,  but  you  must  select  it  for  use  each  time you begin a  mysql  session.  You can do this by issuing a  USE  statement as shown above. Alternatively,  you can select the database on the command-line when you invoke  mysql. Just specify its name after any connection parameters that you might need to provide.  For example: shell> mysql -h host -u user -p menagerie Enter password: ********
     

    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