安装
groupadd mysql
useradd -g mysql mysql
./configure --prefix=/opt/apps/mysql-5.1.72 --enable-local-infile --with-charset=utf8 --with-extra-charsets=all --with-plugins=all
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /opt/apps/mysql-5.1.72
bin/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql var
sudo chgrp -R mysql .
启动
sudo bin/mysqld_safe --user=mysql &
关闭
groupadd mysql
useradd -g mysql mysql
./configure --prefix=/opt/apps/mysql-5.1.72 --enable-local-infile --with-charset=utf8 --with-extra-charsets=all --with-plugins=all
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /opt/apps/mysql-5.1.72
bin/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql var
sudo chgrp -R mysql .
启动
sudo bin/mysqld_safe --user=mysql &
关闭
sudo bin/mysqladmin shutdown
首次修改root密码
bin/mysqladmin -u root password "new-password"