您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
这里以预编译二进制方式安装部署,与编译安装相比,不需要编译,直接修改好my.cnf
初始化后即可使用,推荐生产环境使用这种方式。
cd ~
wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.39-linux-glibc2.12-x86_64.tar.gz
cat /etc/my.cnf
[client]
port = 3306
socket = /data/coohua/mysql/mysql.sock
default-character-set = utf8
[mysqld]
port = 3306
socket = /data/coohua/mysql/mysql.sock
basedir = /app/3rd/mysql/mysql
datadir = /data/coohua/mysql/data/
pid-file = /data/coohua/mysql/data/mysqld.pid
user = mysql
character-set-server =utf8
innodb_large_prefix=on
lower_case_table_names = 1
server-id = 1
groupadd mysql
useradd -g mysql -M -s /sbin/nologin mysql
mkdir -p /app/3rd/mysql
mkdir -p /data/coohua/mysql
tar -zxf mysql-5.6.39-linux-glibc2.12-x86_64.tar.gz -C /app/3rd/mysql/
ln -s /app/3rd/mysql/mysql-5.6.39-linux-glibc2.12-x86_64 /app/3rd/mysql/default
chown -R mysql.mysql /app/3rd/mysql #程序目录
chown -R /data/coohua/mysql/ #数据目录
cd /app/3rd/mysql/mysql-5.6.39-linux-glibc2.12-x86_64
./scripts/mysql_install_db --defaults-file=/app/3rd/mysql/default/my.cnf --user=mysql
please install the following Perl modules before executing scripts/mysql_install_db:
缺少autoconf
yum -y install autoconf
error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
缺少libaio
yum install -y libaio
./scripts/mysql_install_db --defaults-file=/app/3rd/mysql/default/my.cnf --user=mysql
/app/3rd/mysql/default/bin/mysqld_safe --defaults-file=/app/3rd/mysql/default/my.cnf --user=mysql &
./bin/mysqladmin -S /tmp/mysql.sock -u root -h localhost password 'root'
mysql -S /tmp/mysql.sock -uroot -hlocalhost -proot
delete from mysql.user where password=''; #删除无密码用户
drop database test; #删除test数据库
至此mysql5.6版本已经安装完毕,但仅仅是安装完毕,后续要的优化很多
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。