安装
# tar zxvf mysql-5.0.45.tar.gz
# cd mysql-5.0.45
# ./configure --prefix=/usr/ali/mysql --enable-thread-safe-client --with-charset=utf8
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf
# make clean
创建mysql用户
# groupadd mysql
# useradd -g mysql mysql
设置目录访问权限
# cd /usr/ali/mysql
# chown -R mysql .
# chgrp -R mysql .
# bin/mysql_install_db --user=mysql (初始化表)
# chown -R root .
# chown -R mysql var
运行
# /usr/ali/mysql/bin/mysqld_safe --user=mysql &
阅读(752) | 评论(0) | 转发(0) |