Creating and Working with a MySQL Database

The key to using MySQL is an understanding of the SQL syntax itself. If you've used Oracle or another SQL-based system, you'll be right at home interacting with MySQL. For beginners, this introduction should be enough to get started, but we recommend a more complete text such as MySQL, 2nd Edition (ISBN: 0-7357-1212-3).

To start MySQL, invoke the client (mysql) using mysql -u<username> -p<password>. To start, only the root account is available. If you didn't set the password for root, no password is required.


The MySQL tools (including the client you're using now) can be used to access MySQL servers across a network using the -h <hostname/ip> switch. You could, for example, connect to a server named ...

Get Mac OS® X Tiger™ Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.