www.databasejournal.com/features/mysql/article.php/1430061
October 11, 1999 Your first MySQL DatabaseHoping that you've successfully installed the MySQL distribution onto your system, let's start creating your first MySQL database. Last month we used Microsoft Access to create a simple Clients database which contained two tables -- we'll recreate that pleasantly simple structure here in MySQL. Although this is a simple example, it should lay the groundwork for any other relational database you wish to create and manage in MySQL. To recap from last month, let's look once again at the Clients database, and the two tables it consists of:
We'll assume that the data for these tables now resides in tab-delimited text files; in other words, the text file containing the data for billing would look like:
As summarized earlier, we need to first establish this database in MySQL and create the skeletal structure for the tables -- then we can import the raw data. Step 1: Create a new database using mysqladmin.
By default, the MySQL server will create a subdirectory for the new database, Clients, in mysql/data. If you would like to store your databases somewhere other than the MySQL installation path, you need to start mysqld with the --datadir parameter; simply execute mysqld --help on a command line to view usage details. |
| Go to page: Prev 1 2 3 4 5 6 7 8 Next |
|
|
|
|
|
|