一机双mysql的安装和启动注意事项目

./configure --prefix=/usr/local/mysql5.1/ --with-mysqld-user=mysql --sysconfdir=/usr/local/mysql5.1/ --localstatedir=/usr/local/mysql5.1/data --with-tcp-port=3307 -enable-assembler --with-mysqld-ldflags=-all-static --with-charset=utf8 --with-extra-charsets=gbk --with-extra-charsets=all --with-plugins=csv,innobase,myisam,heap --with-unix-socket-path=/etc/mysql3307.sock

Mysql5.1版本启动方式 : /usr/local/mysql5.1/bin/mysqld_safe --user=mysql --datadir=/usr/local/mysql5.1/data/ --basedir=/usr/local/mysql5.1/ --socket=/tmp/mysql3307.sock --port=3307

初始化mysql:/usr/local/mysql5.1/bin/mysql_install_db --user=mysql --datadir=/usr/local/mysql5.1/data

连接方式:/usr/local/mysql5.1/bin/mysql -P3307 -S/tmp/mysql3307.sock –uroot

posted @ 2016-05-20 15:33  小秒  阅读(204)  评论(0编辑  收藏  举报