亲测验证适用于5.7.10
1. 获得二进制文件
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.10-linux-glibc2.5-x86_64.tar.gz
2. 加压到 /usr/local/mysql 目录(或者解压到当前目录然后做软链接到/usr/local/mysql)
mkdir /usr/local/mysql
tar -xvf mysql-5.7.10-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.10-linux-glibc2.5-x86_64/* /usr/local/mysql/
3. 创建 /usr/local/mysql/data 目录
mkdir /usr/local/mysql/data
4. 创建mysql用户和修改软件的权限
groupadd mysql
useradd -r -g mysql mysql -s /sbin/nologin (创建mysql用户并设置不可登录)
chown -R mysql.mysql /usr/local/mysql/
5. 初始化数据(切换当前目录到/usr/local/mysql)
bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
2016-01-20 02:47:35 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2016-01-20 02:47:45 [WARNING] The bootstrap log isn't empty:
2016-01-20 02:47:45 [WARNING] 2016-01-19T18:47:36.732678Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead
2016-01-19T18:47:36.750527Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2016-01-19T18:47:36.750560Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
6. 复制配置文件到 /etc/my.cnf
cp -a ./support-files/my-default.cnf /etc/my.cnf (如果问是否替换选择Y)
7. mysql的服务脚本放到系统服务中
cp -a ./support-files/mysql.server /etc/init.d/mysqld
service mysqld start
cat /root/.mysql_secret
# Password set for user 'root@localhost' at 2016-01-20 03:22:59
Tl:iRfEhRlQ6
bin/mysql -uroot -p(输入Tl:iRfEhRlQ6)
[root@c12 mysql57]# ./bin/mysqladmin -u root -p password
Enter password:
New password:
Confirm new password:
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.8-rc |
+-----------+
1 row in set (0.00 sec)
特别鸣谢51CTO
z597011036的博客
gcc常用编译选项
windows下rabbitmq-c编译(带openssl、无需MinGW)
windows下openssl编译
关于actor模型
mysql优化之使用iotop+pt-ioprofile定位具体top io文件
centos6下jbd2进程占用大量IO处理
c++中的header-only library
java中线程的停止以及LockSupport工具类
java Condition条件变量的通俗易懂解释、基本使用及注意点
- 最新文章
-
ReentrantLock$Sync.tryRelease java.lang.IllegalMonitorStateException
SSL/TLS代理(termination proxy)
rabbitmq集群故障恢复详解
mysql Out of range value adjusted for column导致Warning(1265)Data truncated for column 'column_name' at row 1
rabbitmq集群安装与配置(故障恢复)
架构师是大忽悠吗?阿里技术大牛告诉你真相!
MQ选型对比RabbitMQ RocketMQ ActiveMQ Kafka(外加redis对比及其实现)
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
改变的六条规则
优秀的领导与差劲的领导
- 热门文章
-
非项目——产出物:改变的价值
一句话说清楚cache和buffer
团队使人懒惰--林格曼效应
缺乏经验的管理者有哪些常犯错误?
Linus 谈软件开发管理经验(转载)
rabbitmq队列的exclusive,durability,auto-delete属性以及消息可靠传输设计
AMQP 0.9.1和1.0协议差别以及rabbitmq支持情况
mybatis 3.2.*打印sql结果集
protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED
Excel vba map/dictionary