首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

MYSQL完整安装和主从双机配置

################################# mysql 完整安装 ########################### groupadd  mysql useradd -g mysql mysql mv /root/mysql-5.0.51b.tar.gz /usr/local/src tar -zxvf mysql-5.0.51b.tar.gz cd mysql-5.0.51b ./configure --with-charset=latin1 --with-extra-charsets=all --enable-assembler --with-mysqld-ldflags=-all-static --with-mysqld-user=mysql --prefix=/usr/local/mysql-5.0.51b --localstatedir=/data/mysql5051_db make make install ln -s /usr/local/mysql-5.0.51b /usr/local/mysql mkdir -p /data/mysql5051_db/dbdata mkdir -p /data/mysql5051_db/innodb mkdir -p /data/mysql5051_db/binlog chown -R mysql:mysql  /data/mysql5051_db chmod -R 775 /data/mysql5051_db cd /usr/local/src/mysql-5.0.51b vim ./scripts/mysql_install_db中的ldata=/data/mysql5051_db/dbdata cp ./support-files/my-small.cnf /etc/my.cnf /usr/local/mysql-5.0.51b/bin/mysql_install_db --basedir=/usr/local/mysql-5.0.51b --ldata=/data/mysql5051_db/dbdata --user=mysql vim /etc/my.cnf bind-address    = 192.168.0.8 datadir     = /data/mysql5051_db/dbdata/ pid-file    = /data/mysql5051_db/my.pid log-slow-queries=/data/mysql5051_db/dbdata/slowquery.sql log-bin  = /data/mysql5051_db/binlog/sortrepl.log ################innodb#################### # Uncomment the following if you are using InnoDB tables innodb_data_home_dir = /data/mysql5051_db/innodb/ innodb_data_file_path = ibdata1:1000M;ibdata2:1000M:autoextend:max:800M

01
领券