|
|
|
| Author Details |
|---|
| All Tutorials by dev.mysql |
1 2 [Next] [Last Page]
|
|---|
Introduction to MySQL
This chapter provides a tutorial introduction to MySQL by showing how to use the mysql client program to create and use a simple database.
| | Hits:256 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|---|
Connecting to and Disconnecting from the Server
Before you can start running your queries you need to get your client talking with your server.
| | Hits:193 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|---|
This section describes the basic principles of entering commands, using several queries you can try out to familiarise yourself with how mysql works.
| | Hits:168 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|---|
Creating and Using a Database
Now that you know how to enter commands, it's time to access a database.
| | Hits:307 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|---|
Creating and Using a Database
Now that you know how to enter commands, it's time to access a database.
| | Hits:118 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|---|
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. However, for a variety of reasons, our recommended best practice is always to use the same lettercase that was used when the database was created.)
| | Hits:82 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|---|
Creating a Table
Once you have a database, it's time to make some tables.
| | Hits:81 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|---|
Getting Information About Databases and Tables
What if you forget the name of a database or table, or what the structure of a given table is (for example, what its columns are called)? MySQL addresses this problem through several statements that provide information about the databases and tables it supports.
| | Hits:130 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|---|
Using mysql in Batch Mode
You've probably used mysql interactively to enter queries and view the results. You can also run mysql in batch mode.
| | Hits:87 Rate: 0.0(out of 5) Vote:0 Submit Date :2006-03-20 Rate It | Error | Review | | | Category: Home > Database > MySQL |
|
|
|
|
|
|
|
|