Prev | Current Page 118 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

We will show you the steps to create your database and create a user with full
privileges to it using phpMyAdmin that ships with XAMPP, but you can use other visual interfaces
such as Toad (http://www.quest.com/toad-for-mysql) or even the MySQL text-mode
console.
Before moving on, make sure you have MySQL started. On Windows, you can start MySQL
from the XAMPP Control Panel, and on Linux, it usually starts when you start XAMPP (the
command to start XAMPP on Linux is /opt/lamp/lamp start). Follow the steps in the exercise
to create the database and a new user account.
CHAPTER 3 ?–  STARTING THE TSHIRTSHOP PROJECT 58
Exercise: Creating the tshirtshop Database and a New User Account
1. Load the phpMyAdmin page in your favorite web browser (http://localhost/phpmyadmin); type
tshirtshop in the ???Create new database??? text box; and choose the utf8_unicode_ci collation, as shown
in Figure 3-11.
Figure 3-11. Creating the tshirtshop database using phpMyAdmin
2. Click the Create button to create the new database. In the screen that follows (see Figure 3-12), you??™re
shown the SQL query phpMyAdmin used to create your database.
Figure 3-12. Editing your database using phpMyAdmin
CHAPTER 3 ?–  STARTING THE TSHIRTSHOP PROJECT 59
?– Note You??™ll learn more about SQL queries in Chapter 4. SQL is the language used to interact with the
database. However, you can accomplish many tasks, such as creating databases and data tables, using
a web interface such as phpMyAdmin, which generates the SQL queries for you.


Pages:
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130