Back to Tools and Features

How To Install MySQL

Run the following commands to install MySQL.

yum install mysql
yum install mysql-devel
yum install mysql-server

To start MySQL up, you then type:

service mysqld start

The config file for MySQL is located at /etc/my.cnf
Some good settings to be aware of are:

datadir = /var/lib/mysql
query_cache_type = 1
query_cache_limit = 128K
query_cache_size = 2M

To review the MySQL monitor type "mysql" at the command line and then type "show status;" to review several stats for your MySQL installation.

To create a database called users type "create database users;"
To check existing databases type "show databases;"
To select a database using 'users' from above type "use users;"

Creating a table with two rows would be accomplished with "create table users(firstname varchar(32), lastname varchar(32));"
If you want to verify that your creation worked, type "show tables;"

Related Articles

How To Create And Download A Backup
How To Delete Your Content
Does WestHost Offer Ruby On Rails Support
What Perl Modules Are Installed By Default
Does WestHost Allow TeamSpeak

Can’t Find what you need?

No worries, Our experts are here to help.