linux17 mysql_installation
DESCRIPTION
MySQL on LinuxTRANSCRIPT
MySQL Database:
• MySQL is developed, marketed, and supported by MySQL AB.
• Swedish company
MySQL on Linux
2
MySQL Database:
• Fast• Easy-to-use RDBMS• For small and big businesses
MySQL on Linux
3
MySQL Database - Popular:
• an open-source license - nothing to pay to use it.
• very powerful program• handles a large subset of the
functionality of the most expensive and powerful database packages
MySQL on Linux
4
MySQL Database - Popular:
• uses a standard form of the well-known SQL data language.
• works on many operating systems• with many languages including PHP,
PERL, C, C++, JAVA, etc.
MySQL on Linux
5
MySQL Database - Popular:
• works very quickly and works well even with large data sets.
• very friendly to PHP - for web development.
• supports large databases - up to 50 million rows or more in a table.
MySQL on Linux
6
MySQL Database - Popular:
• default file size limit for a table is 4GB – [a theoretical limit of 8 million terabytes (TB)].
• customizable - allows programmers to modify the MySQL software to fit their own specific environments.
MySQL on Linux
7
Downloading MySQL• All downloads for MySQL are located
at MySQL Downloads1)http://www.mysql.com/downloads2)http://dev.mysql.com/downloads/
mysql/5.1.html
MySQL on Linux
8
Downloading MySQL• Pick the version and the platform of MySQL
Community Server you want.downloaded the “Red Hat Enterprise Linux 5 RPM (x86)”
1. MySQL-client-community-5.1.25-0.rhel5.i386.rpm2. MySQL-server-community-5.1.25-0.rhel5.i386.rpm3. MySQL-devel-community-5.1.25-0.rhel5.i386.rpm
MySQL on Linux
9
Downloading MySQL
• The recommended way to install MySQL on a Linux system is via RPM. MySQL AB makes the following RPMs available for download on its web site:
1.MySQL - The MySQL database server, which manages databases and tables, controls user access, and processes SQL queries.
MySQL on Linux
10
Downloading MySQL
2. MySQL-client - MySQL client programs, which make it possible to connect to and interact with the server.
3. MySQL-devel - Libraries and header files that come in handy when compiling other programs that use MySQL.
4. MySQL-shared - Shared libraries for the MySQL client.
5. MySQL-bench - Benchmark and performance testing tools for the MySQL database server.
MySQL on Linux
11
Downloading MySQLThe MySQL RPMs listed here are all built on a SuSE Linux system, but they'll usually work on other Linux variants with no difficulty.
MySQL on Linux
12
Downloading MySQL
• Remove the existing default MySQL that came with the Linux distribution:
Do not perform this on an system where the MySQL database is getting used by some application
MySQL on Linux
13
14
• Now, follow the following steps to proceed for installation:• Login to the system using root user.• Switch to the directory containing the
RPMs:• Install the MySQL database server by
executing the following command. Remember to replace the filename in italics with the file name of your RPM.
Installing MySQL
15
Installing MySQL
• This is optinal but recommanded step to install the remaining RPMs_
Verifying MySQL Installation
16
• After MySQL has been successfully installed, the base tables have been initialized, and the server has been started, you can verify that all is working as it should via some simple tests.
• Use the mysqladmin Utility to Obtain Server Status:
• Use mysqladmin binary to check server version. This binary would be available in /usr/bin on linux and in C:\mysql\bin on windows.
17
It will produce the following result on Linux
Verifying MySQL Installation
Follows the steps below to stop and start MySQL
18
Post Installation Steps:
19
MySQL ships with a blank password for the root MySQL user. As soon as you have successfully installed the database and client, you need to set a root password as follows:
Connect to MySQL
20
Now to make a connection to your MySQL server, you would have to use the following command:
Connect to MySQL
21
Running MySQL at boot time:
22
If you want to run MySQL server at boot time, then make sure you have following entry in /etc/rc.local file.
Execute simple SQL commands using MySQL Client:
23
You can connect to your MySQL server by using MySQL client using mysql command. At this moment, you do not need to give any password as by default it will be set to blank.
Execute simple SQL commands using MySQL Client:
24
Running and Shutting down MySQL Server:
25
First check if your MySQL server is running or not. You can use the following command to check this:
If your MySql is running, then you will see mysqld process listed out in your result.
Running and Shutting down MySQL Server:
26
If server is not running, then you can start it by using the following command:
Running and Shutting down MySQL Server:
27
if you want to shut down an already running MySQL server, then you can do it by using the following command:
Bibliography
1) https://dev.mysql.com/doc/refman/5.1/en/linux-installation-rpm.html
2) http://www.tutorialspoint.com/mysql/mysql-administration.htm
3) http://www.thegeekstuff.com/2008/07/howto-install-mysql-on-linux/
4) http://www.cyberciti.biz/faq/how-to-install-mysql-under-rhel/
28