shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> tar zxvf mysql-max-5.0.27-linux-i686.tar.gz //解压mysql安装包
shell> ln -s mysql-max-5.0.27-linux-i686 mysql //建立符号链接
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql ///初试化表并且规定用mysql用户来访问。
shell> chown -R root .//初始化表以后就开始给mysql和root用户设定访问权限
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql & //start the MySQL server
shell>sudo support-files/mysql.server stop //stop mysql
shell>bin/mysqladmin -u root password yourpassword //修改密码
阅读(1473) | 评论(1) | 转发(0) |