[三]安裝mysql 5.0
# cd /home/myhome/software/
# tar zvxf mysql-5.0.45-linux-i686-glibc23.tar.gz
# mkdir -p /usr/local/mysql (省略也可)
# cp -r mysql-5.0.45-linux-i686-glibc23/* /usr/local/mysql/
# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
# chmod 600 /etc/my.cnf

新增 mysql  USER與GROUP
# groupadd mysql
# useradd -g mysql mysql

修改mysql目錄權限
# cd /usr/local/mysql
# chown -R mysql .
# chgrp -R mysql .
# scripts/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql data
# /usr/local/mysql/bin/mysqld_safe --user=mysql &


如出現 Starting mysqld daemon with databases from /usr/local/mysql/data 代表正常啟動mysql服務了,
按Ctrl + C 跳出修改 mysql 的 root 密碼
# /usr/local/mysql/bin/mysqladmin -u root password 'MyPasswd'


hsinichi 發表在 痞客邦 留言(0) 人氣()