Following the Swiss Army knife theory (20 percent of the functions give you 80 percent of the utility), a few SQL commands go a long way to facilitate learning MySQL/Perl/DBI.
To illustrate these, we create a simple database containing information about some (fictional) people. Eventually, we’ll show how to enter this information from a form on the Web (see Chapter 7), but for now we interface with SQL directly.
First, try to make a connection to our MySQL server as the root MySQL user:
$ mysql -u root
The MySQL root user is different from the Linux root user. The MySQL root user is used to administer the MySQL server only.
If you see the following output:
ERROR 2002: Can’t connect to local MySQL server through socket ´/var/lib/mysql/mysql.sock´(2) ...