Database Reference
In-Depth Information
First Steps
Having seen the overall layout of phpMyAdmin's panel, we are ready to create a
database, our first table, insert some data in it, and browse it. These first steps are
intentionally simple, but they will give you the foundation on which more complex
operations are achieved later. Moreover, at the end of the chapter, we will have at our
disposition, the two basic tables on which the remaining of the exercises are based.
Database creation
Before creating a table, we must ensure that we have a database for which
the MySQL server's administrator has given us the
CREATE
privilege. Various
possibilities exist:
•
The administrator has already created a database for us, and we see its name
in the left panel; we don't have the right to create an additional database
We have the right to create databases from phpMyAdmin
•
•
We are on a shared host, and the host provider has installed a general Web
interface (for example, Cpanel) to create MySQL databases and accounts
Note that a configuration parameter,
$cfg['ShowCreateDb']
, controls the display of
the
Create new database
dialog. By default, it is set to
true
, which shows this dialog.
No privileges?
If you do not have the privilege to create a database, the homepage displays a
No
privileges
message under the
Create new database
label. This means that you
must work with the databases already created for you, or ask the MySQL server's
administrator to give you the necessary
CREATE
privilege.
If you
are
the MySQL server's administrator, refer to Chapter 18.
Search WWH ::
Custom Search