Home > Database > Mysql Tutorial > body text

How to quickly deploy a MySQL database server

PHPz
Release: 2023-06-03 09:11:54
forward
809 people have browsed it

MySQL is a relational database management system developed by the Swedish MySQL AB company and is currently a product of Oracle. MySQL is one of the most popular relational database management systems. In terms of WEB applications, MySQL is the best RDBMS (Relational Database Management System) application software.

How to quickly deploy a MySQL database server

Installing a complete MySQL database requires the following RPM package files:

  1. perl-DBI- 1.609-4.e16.i686.rpm: Perl language data API

  2. perl-DBD-MySQL-4.013-3.e16.i686.rpm: MySQL and Perl language interface program Package

  3. mysql-5.1.61-4.e16.i686.rpm:MySQL database client program

  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

After copying the above files to the current directory, execute the following commands in order to install:

# 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
Copy after login

After the installation is successful, the relevant Several important files of the MySQL server software are distributed as follows:

  1. ##/etc/rc.d/init.d/mysqld: MySQL server startup script

  2. /usr/bin/mysqlshow: Display database, table and column information

  3. /usr/libexec/mysqld: Server process program file

  4. /usr/libexec/mysqlmanager: Instance management program file

  5. /usr/share/doc/: Directory for storing description files

  6. /usr/share/man/man 1/……: Directory where manual pages are stored

  7. /var/lib/mysql/: Server database file storage directory

  8. /var/log/mysqld.log: The log file of the MySQL server

In order to run mysql, you can enter the following command:

# /etc/rc.d/init.d/mysqld start
Copy after login

Then enter the following command to check whether the process is started:

#ps -eaf | grep mysqld
Copy after login

When the process is started, you can use the following command to check the mysqld default Check whether the listening port has been opened:

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

It can be seen that port 3306 is already open. In order to 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
Copy after login

After the above process is completed, you can connect to the MySQL server through the client.

Finally, in order to ensure that the server has started normally, you can enter the following command to check:

# mysqladmin version
Copy after login
When the version details appear, it means that the MySQL server is running normally.

The above is the detailed content of How to quickly deploy a MySQL database server. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!