Environment:
db01:10.10.10.101
db03:10.10.10.103
Requirements:
will db01 Complete migration on mysql, migrate to db03
Detailed steps:
1. Package db01 on /app directory and scp to db03: #tar -cvzf mysql.tar.gz /app/;scp mysql.tar.gz 10.10.10.103:/root/2. copy db01 on /etc/ld.so.conf.d/mysql.conf to the corresponding directory of db03, ie /etc/ld.so.conf.d /#scp /etc/ld.so.conf.d/mysql.conf 10.10.10.103:/etc/ld.so.conf.d/3. Unzip mysql.tar.gz in the root directory of db03: cd /;tar -xvf /root/mysql.tar.gz4. Modify the /app/conf/mysql/my.cnf configuration file on db03 (here the main logout slave configuration to start mysql normally)#*** slave ***#master -host = 10.10.10.101#master-USER = slave_user#master-password = 123456#master-port = 3306#replicate-ignore-db=mysql,test#replicate-do-db = <dataname>#relay-LOG = relay-LOG#log-slave-updatesserver-id = 3 ##Modify values other than other server ids 5. Create a new directory based on the /app/conf/mysql/my.cnf configuration file: #mkdir -p /log/Mysql//data/my Sql#mysql_install_db --datadir=/data/mysql/#chown mysql:mysql /log/mysql//data/mysql/-R#mysql_install_db --datadir=/data/mysql/
#mysql_install_db -- Datadir=/data/mysql/6. Add mysql to the boot line and check: ln -s /app/init.d/mysql /etc/init.d/mysql;chkconfig mysql on# chkconfig --list |
Grep mysqlmysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off7. Add mysql to the PATH environment variable and make it effective: #vi /root/.bash_profilePATH=$PATH:$HOME/bin :/app/mysql/SHARE/mysql:/app/mysql/bin# source /root/.bash_profile8. For security reasons, manually load the lib library: #ldconfig9. Test mysql to see if it can start normally #mysql
- - If there is an unexpected error in the migration process, please check the error message according to /var/log/messages /log/mysql/mysqld.log
Whether you are a Linux command line newbie or a veteran, these tips can help you improve, save time
Download NetBeans Take netbeans-7.0beta2-ml-javaee-linux.sh as an example #sh netbeans-7.0beta2-ml-
Record your favorite Linux system commands for easy reference later, and find that memory is getting
The original use of Tomcat in Linux does not use the newly created user created by the non-ROOT perm
Solution for Starting ONTRACK (DDO) message each time it starts up
The number of desktop Linux users has dropped sharply
Linux switch path usage guide guide
How to install the graphics card driver under Linux Step
Linux operating system network card installation guide (on)
Top Ten Tips Linux Fast Starts as Fast as Possible
RHEL6 builds a YFT source server based on vsftd
KVM Basic Principles and Architecture II - Basic Principles
Win 8 can't access the Internet, what should I do?
How to close Win10 file protection?
Win 8 uses ClearType to adjust the font effect
Win8.1 input method is gone, what to do
How to change the Win8 account avatar
Microsoft Forced Win10 Home Edition users to automatically install all the
The magic of 7 members offline download function
British killing soft parsing: How important is Microsoft's August IE security patch