LInux安装MySQL5.7.24详情
安装包下载
MySQL 的官网下载地址:http://www.mysql.com/downloads/
我安装的是5.7版本

第二步:

选择:TAR
(mysql-5.7.24-el7-x86_64.tar) 点击下载
然后点击 No thanks, just start my download. 进行下载。
检查是否安装过mysql
[root@master mysql]# rpm -qa|grep mysql
mysql-community-common-5.7.10-1.el7.x86_64
mysql-community-libs-5.7.10-1.el7.x86_64
mysql-community-server-5.7.10-1.el7.x86_64
qt-mysql-4.8.5-13.el7.x86_64
mysql-community-client-5.7.10-1.el7.x86_64
下载已经安装
[root@master mysql]# rpm -e --nodeps mysql-community-common-5.7.10-1.el7.x86_64
[root@master mysql]# rpm -e --nodeps mysql-community-common-5.7.10-1.el7.x86_64
[root@master mysql]# rpm -e --nodeps mysql-community-libs-5.7.10-1.el7.x86_64
[root@master mysql]# rpm -e --nodeps mysql-community-server-5.7.10-1.el7.x86_64
[root@master mysql]# rpm -e --nodeps qt-mysql-4.8.5-13.el7.x86_64
[root@master mysql]# rpm -e --nodeps mysql-community-client-5.7.10-1.el7.x86_64
再次查看
[root@master mysql]# rpm -qa|grep mysql
[root@master mysql]#
查看是否按照自带的mariadb数据库
[root@master mysql]# rpm -qa|grep -i mariadb
5.MySQL的server端需要Perl支持,安装一下
[root@master mysql]# yum install perl -y
检查mysql组和用户
是否存在,如无创建:
[root@master mysql]# cat /etc/group | grep mysql
[root@master mysql]# cat /etc/passwd |grep mysql
[root@master mysql]# groupadd mysql
[root@master mysql]# useradd -r -g mysql mysql
放置安装包
从官网下载mysql安装包,解压后移动到/usr/local/mysql下
[root@master mysql]# ls
bin COPYING COPYING-test data docs include lib man mysql-test README README-test share support-files
创建数据目录data
mkdir -p /usr/local/mysql/data
cd /usr/local
chown -R mysql:mysql mysql/
chmod -R 755 mysql/
安装初始化MySQL
[root@master bin]# /usr/local/mysql/mysql/bin/mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql
2019-01-03T04:39:31.511114Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-01-03T04:39:31.522846Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2019-01-03T04:39:31.836656Z 0 [Warning] InnoDB: New log files created, LSN=45790
2019-01-03T04:39:31.878589Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2019-01-03T04:39:31.936673Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 902eefb4-0f11-11e9-8e04-000c29cb0c40.
2019-01-03T04:39:31.937605Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2019-01-03T04:39:31.939061Z 1 [Note] A temporary password is generated for root@localhost: i89mHkP#VI5r
启动MySQL服务
[root@master ~]# /usr/local/mysql/support-files/mysql.server start
Starting MySQL. SUCCESS!
[root@master ~]#
做个软连接重启服务
ln -s /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
[root@master ~]# service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL. SUCCESS!
[root@master ~]#
做个软链接,将安装目录下的mysql 放在/usr/bin 目录下
[root@master ~]# ln -s /usr/local/mysql/bin/mysql /usr/bin
修改密码,开放远程
[root@master ~]# mysql -u root -p
Enter password:
Server version: 5.7.24
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> alter user 'root'@'localhost' identified by 'mysql';
Query OK, 0 rows affected (0.00 sec) mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
mysql> update user set user.Host='%' where user.User='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0 mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec) mysql>
测试远程连接

OK 完成。前台可以查询到结果。
LInux安装MySQL5.7.24详情的更多相关文章
- linux安装mysql5.7.24
一.卸载 mysql安装有三种方式,包括二进制包安装(Using Generic Binaries).RPM包安装.源码安装.一般是前两种比较多 卸载方法参考Linux->卸载Mysql方法总结 ...
- [转]阿里云CentOS 7.1使用yum安装MySql5.6.24
阿里云CentOS 7.1使用yum安装MySql5.6.24 作者:vfhky | 时间:2015-06-25 09:43 | 分类:web 在前面两篇文章<2015博客升级记(四):Cent ...
- Windows Server 2012安装mysql5.7.24记录
系统环境: 一.下载mysql5.7.24安装包 地址:https://dev.mysql.com/downloads/mysql/5.7.html#downloads 下载解压到相应的目录,我的路径 ...
- linux安装MySQL5.7记录
目录 linux安装MySQL5.7记录 1. 在根目录下创建文件夹/software和数据库数据文件/data/mysql 2. 从官网下载相应的MySQL版本 3. 解压并移动到/software ...
- linux 安装 mysql-5.6.26
linux安装mysql-5.6.26 查看工具:winscp 下载地址 http://mirrors.sohu.com/mysql/MySQL-5.6/ 文件: mysql-5.6.26-linux ...
- Kali 2019(debian linux)安装MySql5.7.x
Kali 2019(debian linux)安装MySql5.7.x MySQL安装 确认是否安装MySQL 终端输入:mysql 如出现Welcome to the MariaDB monitor ...
- Linux安装MySql5.7及配置(yum安装)
Linux安装MySql5.7及配置(yum安装) [root@xld ~]# rpm -q centos-release centos-release-7-7.1908.0.el7.centos.x ...
- Linux安装mysql5.7版本
1.linux安装mysql5.7顺序 ①mysqladmin –version 查看版本号 ②mysql5.7安装在linux中需要先初始化 Mysqld –initialize –user=mys ...
- Linux下安装mysql-5.7.24
Mysql数据库的安装对于开发者来说,是我们必然会面对的问题,它的安装过程其实并不复杂,并且网络上的安装教程也非常多,但是对于新手来说,各种不同形式的安装教程,又给新手们带来了要选择哪种方式进行安装的 ...
随机推荐
- 转: 动态加载、移除js、css文件
function loadjscssfile(filename, filetype){ if (filetype=="js"){ var fileref=document.crea ...
- EL表达式与JSTL标签库(二)
1.JSTL标签库 标签库 作用 URI 前缀 核心 包含Web应用的常见工作,如循环.输入输出等 http://java.sun.com/jsp/jstl/core c 国际化 语言区域.消息.数字 ...
- [iOS]UIWebView返回和NSURLErrorDomain-999
1.UIWebView实现返回不崩溃: -(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)r ...
- springboot和springcloud版本冲突问题
最近搭建eureka项目,出现boot和cloud版本不匹配错误,记录下来 2019-12-06 14:00:20.043 ERROR 180780 --- [ main] o.s.boot.Spri ...
- 如何在robotframework基础上使用数据驱动测试
一.写在前面 robotframework是很好用的关键字驱动测试框架,但是在实际工作中也有些地方使用不便,比如在我们设计参数校验测试case时,往往只是想修改校验参数类型而不得不做大量复制粘贴操作, ...
- spring 给容器中注册组件的几种方式
1.@Bean 导入第三方的类或包的组件 2.包扫描+组件的标注注解(@ComponentScan: @Controller,@service,@Reponsitory,@Componet), 自己写 ...
- Tensorflow实战第十一课(RNN Regression 回归例子 )
本节我们会使用RNN来进行回归训练(Regression),会继续使用自己创建的sin曲线预测一条cos曲线. 首先我们需要先确定RNN的各种参数: import tensorflow as tf i ...
- 【神经网络与深度学习】【C/C++】比较OpenBLAS,Intel MKL和Eigen的矩阵相乘性能
比较OpenBLAS,Intel MKL和Eigen的矩阵相乘性能 对于机器学习的很多问题来说,计算的瓶颈往往在于大规模以及频繁的矩阵运算,主要在于以下两方面: (Dense/Sparse) Matr ...
- 【Python开发】Url中文字符时记得转码edcode("utf-8")
在url中使用中文其实是一个坏习惯,会带来一系列的转码问题, 我更喜欢英文译名或者id来标识某个uri.但是现实往往是残酷的, 特别是在我们调用别人服务时候,有时候被逼无奈使用中文URL. Pytho ...
- C++ unsigned long 转化为 unsigned char*
C++ Code 123456789101112131415161718 unsigned long lFileLen = 1000; unsigned char *ucFileLenFlag; ...