cp mysql-5.6.17-linux-glibc2.5-i686 /usr/local/mysql -r
groupadd mysql和useradd -r -g mysql mysql
进入安装mysql软件目录:执行命令 cd /usr/local/mysql
修改当前目录拥有者为mysql用户:执行命令 chown -R mysql:mysql ./
./scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql
修改当前目录拥有者为root用户:执行命令 chown -R root:root ./
修改当前data目录拥有者为mysql用户:执行命令 chmod -R 755 /usr/local/mysql/data chmod -R 755 /usr/local/mysql/data/mysql
cp support-files/mysql.server /etc/init.d/mysql
service mysql start
mysqladmin -u root password '密码'
--连接myql后在mysql提示符下执行以下语句
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
flush privileges;