- 论坛徽章:
- 0
|
groupadd mysql
useradd -g mysql -d /dev/null -s /sbin/nologin mysql
mkdir /db/mysql5
./configure
--prefix=/db/mysql5
--enable-local-infile
--with-openssl //如果新安装了OPENSSL,请指向新的openssl安装路径,如果安在/usr目录下,勿须指定
--with-ndbcluster
--enable-assembler
--with-charset=gbk
--with-extra-charsets="gbk gb2312 big5 utf8"
--enable-local-infile
--enable-thread-safe-client
make && make install
cd /db/mysql5
bin/mysql_install_db --user=root
chown -R root .
chown -R mysql var
chgrp -R mysql .
删除/etc/my.cnf
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod +x /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
service mysqld start
./bin/mysqladmin -u root password 'new-password'
./bin/mysql -u root --default-character-set=gbk -p |
|