RHEL 7.2 安装 MySQL 5.7.11 二进制版
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了RHEL 7.2 安装 MySQL 5.7.11 二进制版,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3173字,纯文字阅读大概需要5分钟。
内容图文
![RHEL 7.2 安装 MySQL 5.7.11 二进制版](/upload/InfoBanner/zyjiaocheng/474/baa93217c9bb4d379ccb7ac775b738ed.jpg)
6、启动MySQL数据库
#替换系统自带的my.cnf文件 [root@rhel7 mysql5.7.11]# mv /etc/my.cnf /etc/my.cnf.bak [root@rhel7 mysql5.7.11]# cp support-files/my-default.cnf /etc/my.cnf #在my.cnf中添加如下两条 [root@rhel7 mysql5.7.11]# vi /etc/my.cnf basedir = /opt/mysql/mysql5.7.11 datadir = /mysqldata #启动MySQL [root@rhel7 mysql5.7.11]# ./bin/mysqld_safe --user=mysql & [1] 1756 [root@rhel7 mysql5.7.11]# 2016-12-04T13:44:30.046089Z mysqld_safe Logging to ‘/mysqldata/rhel7.err‘. 2016-12-04T13:44:30.097978Z mysqld_safe Starting mysqld daemon with databases from /mysqldata [root@rhel7 mysql5.7.11]# ps -ef |grep mysql root 1756 1182 0 21:44 pts/0 00:00:00 /bin/sh ./bin/mysqld_safe --user=mysql mysql 1876 1756 1 21:44 pts/0 00:00:00 /opt/mysql/mysql5.7.11/bin/mysqld --basedir=/opt/mysql/mysql5.7.11 --datadir=/mysqldata --plugin-dir=/opt/mysql/mysql5.7.11/lib/plugin --user=mysql --log-error=/m ysqldata/rhel7.err --pid-file=/mysqldata/rhel7.pidroot 1905 1182 0 21:44 pts/0 00:00:00 grep --color=auto mysql
7、登录MySQL,使用安装时给出密码登录并更改root密码
[root@rhel7 mysql5.7.11]# ./bin/mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.11 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql> set password=‘1qaz!QAZ‘; Query OK, 0 rows affected (0.01 sec)
注意:5.6之前使用set password=password(‘newpassword‘)进行改密码,5.7版本不再建议这样改密码,会有如下提示:
mysql> set password=password(‘123456‘); Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> show warnings; +---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Warning | 1287 | ‘SET PASSWORD = PASSWORD(‘<plaintext_password>‘)‘ is deprecated and will be removed in a future release. Please use SET PASSWORD = ‘<plaintext_password>‘ instead | +---------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
到此,MySQL5.7.11安装完成。
官方文档:http://dev.mysql.com/doc/refman/5.7/en/binary-installation.html
本文出自 “DBA Fighting!” 博客,请务必保留此出处http://hbxztc.blog.51cto.com/1587495/1879396
RHEL 7.2 安装 MySQL 5.7.11 二进制版
标签:mysql5.7 安装
本文系统来源:http://hbxztc.blog.51cto.com/1587495/1879396
内容总结
以上是互联网集市为您收集整理的RHEL 7.2 安装 MySQL 5.7.11 二进制版全部内容,希望文章能够帮你解决RHEL 7.2 安装 MySQL 5.7.11 二进制版所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。