A Brief Introduction to SQL using MySQL


IT ZONE

I. Lab Setup

In order to setup this lab for your local users, you will need to install and configure mysql with the appropriate accounts and access. We are going to use the sample database file provided by the O’Reilly book, Learning SQL by Alan Beaulieu. Now, let’s install the mysql utilities and server,

[root@localhost]# yum install mysql
[root@localhost]# yum install mysql-server

Start the daemon and verify the process is running,

[root@localhost]# service mysqld start
[root@localhost]# pgrep -l mysql

Connect to the mysql database, set the root password and verify it is working correctly,

[root@localhost]# mysql -u root
mysql> set password for root@localhost=password('mysecret');
mysql> select user,host,password from mysql.user;
mysql> exit
[root@localhost]# mysql -u root -p
Enter password:

View original post 1,150 more words