安装步骤
mkdir -p /data/mysqldb/
groupadd mysql
useradd -g mysql -d /data/mysqldb/ -s /sbin/nologin mysql
./configure --prefix=/usr/local/mysql/ --localstatedir=/data/mysqldb/ --without-debug --with-charset=utf8 --with-extra-charsets=all --enable-assembler --with-pthread --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
chown -R mysql /data/mysqldb/
chgrp -R mysql /data/mysqldb/
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql /data/mysqldb/
share/mysql/mysql.server start
bin/mysqladmin -uroot password 111qqq,
use mysql;
GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY '111111' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY '111111' WITH GRANT OPTION;
update user set password=password('111111') where user='root';
flush privileges;
exit;
ln -s /usr/local/mysql/bin/mysql /usr/local/bin/
ln -s /usr/local/mysql/share/mysql/mysql.server /usr/local/bin/mysqld
echo "/usr/local/mysql/share/mysql/mysql.server start" >> /etc/rc.d/rc.local
阅读(1259) | 评论(0) | 转发(0) |