Test on Dual-machine hot backup of MySQL on Linux Server

Source: Internet
Author: User
MySQL dual-host hot backup is often used in Linux Server lvs load balancing and dual-host hot backup applications. The installation and configuration process is as follows: 1. Install MMySQL # cpmysql

MySQL dual-host hot backup is often used in Linux Server lvs load balancing and dual-host hot backup applications. The installation and configuration process is as follows: 1. Install MMySQL # cp mysql

MySQL dual-host hot backup is often used in Linux Server lvs load balancing and dual-host hot backup applications. The installation and configuration process is as follows:

1. Install MySQL

# Cp mysql-standard-4.1.9-pc-linux-gnu-i686.tar.gz/usr/local/

# Tar zxvf mysql-standard-4.1.9-pc-linux-gnu-i686.tar.gz

# Music mysql-standard-4.1.9-pc-linux-gnu-i686 mysql

# Cd mysql

# More INSTALL-BINARY

Check the installation documentation. Note that the installation is mainly in red.

# Groupadd mysql (create a mysql Group)

# Useradd-g mysql (create a mysql user and add the user to this group)

# Scripts/mysql_install_db -- user = mysql (execute the database initialization and installation script as a mysql user)

# Chown-R root. (The root permission is the current directory)

# Chown-R mysql data (the mysql permission belongs to the data directory)

# Chgrp-R mysql. (The user and group owner who changed the mysql file/directory are the current directory)

# Bin/mysqld_safe -- user = mysql & (start the mysql database process in the background as a mysql user)

Then we can start the mysql database ,,

The figure above indicates that the installation is correct.

To make the database more secure, set the Database Password.

If the mysql database process can be automatically started when the server is started next time, we need to write the/etc/rc. d/rc. local file

Echo "/usr/local/mysql/bin/mysqld_safe -- user = mysql &" >;>;/etc/rc. d/rc. local

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.