发布网友 发布时间:2022-04-20 11:18
共1个回答
热心网友 时间:2022-05-01 19:28
groupadd mysql
useradd -g mysql mysql -s /sbin/nologin -M
tar -xvzf mysql-5.1.59.tar.gz -C /usr/local/src/
cd /usr/local/src/mysql-5.1.59
./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=innobase --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
make&&make install
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql --skip-external-locking
chown -R root .
chown -R mysql var
bin/mysqld_safe --user=mysql &
export PATH=$PATH:/usr/local/mysql/bin/
/usr/local/mysql/bin/mysql_secure_installation