首 页 行业资讯 新车 试驾评测 养车用车 车型库

Linux系统 如何安装mysql

发布网友 发布时间: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

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com