安装mysql数据库如果你下载的是源码,按如下方式安装# pw groupadd mysql # pw useradd mysql -g mysql -s /nonexitent # tar -zxvf mysql-3.23.53.tar.gz # mv mysql-3.23.53 mysql # cd mysql # ./configure --prefix=/usr/local/mysql # make # make install # scripts/mysql_install_db # chown -R root /usr/local/mysql # chown -R mysql /usr/local/mysql/var # chgrp -R mysql /usr/local/mysql # cp support-files/my-medium.cnf /etc/my.cnf # /usr/local/mysql/bin/safe_mysqld --user=mysql & # echo "/usr/local/mysql/bin/safe_mysqld --user=mysql &" > /etc/rc.local # ./mysqladmin -u root -p password "your-password"已编译包安装方法如下:shell> cd /usr/localshell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -shell> ln -s mysql-VERSION-OS mysqlshell> cd mysqlshell> scripts/mysql_install_dbshell> chown -R root /usr/local/mysqlshell> chown -R mysql /usr/local/mysql/datashell> chgrp -R mysql /usr/local/mysqlshell> chown -R root /usr/local/mysql/binshell> bin/safe_mysqld --user=mysql &# echo "/usr/local/mysql/bin/safe_mysqld --user=mysql &" >> /etc/rc.local 还是注意Mysql的权限比较好如果mysqld不能执行的话# chmod 755 /usr/local/mysql/libexec/mysqld