MySQL Database Server SETUP

Source: Internet
Author: User

MySQL Database Server SETUP
GuideMySQL 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.

Install the complete MySQL database requires the following RPM package files:

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

Copy the preceding files to the current directory and run the following commands to install the files:

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

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

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

To run mysql, enter the following command:

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

Enter the following command to check whether the process is started:

#ps -eaf | grep mysqld

After the process starts, run the following command to check whether the default listening port of mysqld is Enabled:

# netstat -anlp | grep 3306tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1121/mysqld

It can be seen that port 3306 is already on. To ensure that clients on the network can access the MySQL server, run the following command to open the 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.

Original address: http://www.linuxprobe.com/mysql-database-server-set-up/


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.