标题:编译安装MySQL 出处:Felix021 时间:Wed, 02 Nov 2011 17:38:01 +0000 作者:felix021 地址:https://www.felix021.com/blog/read.php?2045 内容: $ tar zxf mysql-5.1.30.tar.gz $ cd mysql-5.1.30 $ mkdir -p /home/fengmin/mysql $ ./configure --prefix=/home/fengmin/mysql --with-plugins=all --with-pthread --with-charset=utf8 --with-extra-charsets=all $ make -j4 &> make.log $ make install $ cd /home/fengmin/mysql $ mkdir data $ ./bin/mysql_install_db --datadir=/home/fengmin/mysql/data/ $ cp ./share/mysql/my-small.cnf my.cnf $ vi my.cnf #修改各种配置 $ ./bin/mysqld_safe --defaults-file=/home/fengmin/mysql/my.cnf & #启动server $ ./bin/mysqladmin -u root password 'newpassword' -h 127.0.0.1 -P 3306 #修改root密码 $ ./bin/mysql -h127.0.0.1 -P 3306 -u root -pnewpassword #连接mysql $ ./bin/mysqladmin -h 127.0.0.1 -P 3306 -u root -pnewpassword shutdown #关闭server Generated by Bo-blog 2.1.0