标签:成功 group usr files 配置 目录 修改密码 oca png
[root@centos3 ~]# tar -zxvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
[root@centos3 ~]# cd /usr/local/
[root@centos3 local]# mv mysql-5.7.19-linux-glibc2.12-x86_64/ mysql
[root@centos3 local]# vi + /etc/profile
[root@centos3 local]# source /etc/profile
[root@centos3 local]# groupadd mysql
[root@centos3 local]# useradd -r -g mysql -s /bin/false mysql
[root@centos3 local]# chown -R mysql mysql/
[root@centos3 local]# chgrp -R mysql mysql/
[root@centos3 local]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --lc_messages_dir=/usr/local/mysql/share --lc_messages=zh_CN
[root@centos3 local]# cd /usr/local/mysql/support-files/
[root@centos3 support-files]# vi mysql.server
[root@centos3 support-files]# cp mysql.server /etc/init.d/mysqld
[root@centos3 support-files]# mv /etc/my.cnf /etc/my_default.cnf
[root@centos3 support-files]# chmod +x /etc/init.d/mysqld
[root@centos3 support-files]# chkconfig --add mysqld
[root@centos3 support-files]# chkconfig mysqld on
//查看开机启动是否成功
[root@centos3 support-files]# chkconfig --list mysqld
[root@centos3 support-files]# /etc/init.d/mysqld start
[root@centos3 support-files]# service mysql start
[root@centos3 support-files]# mysql -uroot -p
mysql> set password=password("1234");
标签:成功 group usr files 配置 目录 修改密码 oca png
原文地址:http://www.cnblogs.com/jottings/p/7614523.html