RHEL 6 platform MySQL Database Server Installation Method, rhelmysql

Source: Internet
Author: User

RHEL 6 platform MySQL Database Server Installation Method, rhelmysql

MySQL database is the most widely used database system in Linux. It can be easily integrated with other servers, such as Apache, Vsftpd, and Postfix. The following describes how to install the MySQL database server on RHEL 6.

1. Install the complete MySQL database using the following RPM package files:

Perl-DBI-1.609-4.e16.i686.rpm: Perl-language data APIs
Perl-DBD-MySQL-4.013-3.e16.i686.rpm: interface packages for MySQL and Perl
Mysql-5.1.61-4.e16.i686.rpm: MySQL database Client
Mysql-connector-odbc-5.1.5r1144-7.e16.i686.rpm: connector between MySQL database and ODBC
Mysql-server-5.1.61-4.e16.i686.rpm: mysql database server program

2. Copy the above files to the current directory and execute the following commands in sequence to install them:

# rpm -ivh perl-DBI-1.609-4.e16.i686.rpm# rpm -ivh perl-DBD-MySQL-4.013-3.e16.i686.rpm# rpm -ivh mysql-5.1.61-4.e16.i686.rpm# rpm -ivh mysql-connector-odbc-5.1.5r1144-7.e16.i686.rpm# rpm -ivh mysql-server-5.1.61-4.e16.i686.rpm

3. After the installation is successful, several important files about the MySQL server software are distributed as follows:

/Etc/rc. d/init. d/mysqld: MySQL server startup script
/Usr/bin/mysqlshow: displays information about databases, tables, and columns.
/Usr/libexec/mysqld: process program file of the server
/Usr/libexec/mysqlmanager: instance management program file
/Usr/share/doc/: directory for storing description files
/Usr/share/man 1 /...
/Var/lib/mysql/: Server database file storage directory
/Var/log/mysqld. log: log file of the MySQL server

To run mysql, enter the followingCommand:

#/Etc/rc. d/init. d/mysqld start

Enter the following commandCheck whether the process is started.:

# Ps-eaf | grep mysqld

After the process is started, run the following command to viewWhether the default listening port of mysqld is enabled:

# Netstat-anlp | grep 3306
Tcp 0 0 0.0.0.0: 3306 0.0.0.0: * LISTEN 1121/mysqld

It can be seen that port 3306 is already in the enabled status.Ensure that clients on the network can access the MySQL server, You can enter the following command to open this Port:

# Iptables-I INPUT-p tcp -- dport 3306-j ACCEPT

After the above process is completed, you can connect to the MySQL server through the client. Finally, to ensure that the server is started properly, run the following command:

# Mysqladmin version

When the version details appear, it indicates that the MySQL server is running properly.

The above is a detailed introduction to the MySQL Database Server installation method. I hope it will be helpful for your learning.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.