System Environment: CentOs6.7 i386
MySQL version: mysql-5.6.36
Root Login Linuxcdpwd#/root/wgethttp//mirrors.sohu.com/mysql/mysql-5.6/mysql-5.6.36-linux-glibc2.5-i686.tar.gz #下载二进制包32位#wgethttp//mirrors.sohu.com/mysql/mysql-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz #下载二进制名64位#wgethttp//mirrors.sohu.com/mysql/mysql-5.6/mysql-5.6.35.tar.gz #下载源码包Useradd-s/sbin/nologin-M MySQL #创建用户Tar-ZXVF mysql-5.6. $-LINUX-GLIBC2.5-i686.Tar. gz-c/usr/local/#解压cd/usr/local/MVmysql-5.6. $-LINUX-GLIBC2.5-i686 MySQL #重命名cd MySQL/mkdir-p/data/MySQLChown-R mysql:mysql/usr/local/mysql/Chown-R mysql:mysql/data/mysql/./scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql/--datadir=/data/mysql/#初始化mysql, two OKCPsupport-files/my-default.cnf/etc/my.cnf #修改my. CNF configuration file Vim/etc/my.cnf #修改my. CNF profile Add content: Basedir=/usr/local/mysql Add content: DataDir=/data/mysql Add content: Port=3306 CPSupport-files/mysql.server/etc/init.d/mysqld #复制mysql startup script Mysql.server to/etc/init.d/mysqldchmod 755/etc/init.d/mysqld #修改启动脚本的权限为755, giving execute permission CD/etc/init.d/Chkconfig--Add mysqld #将mysqld服务加入到自启动服务项中service mysqld start #启动MYSQLservice Mysqld Status #查看MYSQL State/usr/local/mysql/bin/MySQL #进入MYSQL客户端vim/root/. Bash_profile #修改配置参数在PATH= $PATH: $HOME/The bin add parameter is: PATH= $PATH: $HOME/bin:/usr/local/mysql/bin:/usr/local/mysql/Libsource/root/. Bash_profile
Mysqlmysql> GRANT All privileges on * * to Root@"%"Identified by"Root"; #为root添加远程连接的能力. MySQL>Flush Privileges;mysql>\qIf remote connections are not yet in progress, turn off the firewall #/etc/rc.d/init.d/iptables stop
MYSQL binary Installation