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设计模式-代理模式
1.什么是设计模式? 设计模式:在软件设计过程中常用的代码规范,针对特定的场景 2.应用场景: 麦当劳点餐 观察者模式 规定的代码格式 花店送花 :代理模式 真实对象(男同学)-----代理对 ...
- GitHub:Python
ylbtech-GitHub:Python 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 1. https://github.com/python 2. 6 ...
- 自定义View绘制简单的圆环的实现
package com.loaderman.mywave; import android.content.Context; import android.graphics.Canvas; import ...
- 使用ViewFlipper实现广告信息栏的上下翻滚效果
import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.Gestu ...
- bloomberg learning
https://libguides.ust.hk/c.php?g=208028&p=1372192 Introduction to Bloomberg Professional Bloombe ...
- wpf prism IRegionManager 和IRegionViewRegistry
引入了一个新的问题,IRegionViewRegistry和IRegionManager都具有RegisterViewWithRegion方法,二者有区别么? 答案是——没有.我们已经分析过,在Uni ...
- ajax post 请求
$(".login_btn").click(function(){ if($(".user_").val()=="admin"&&a ...
- [笔记] Ubuntu 18.04安装Docker CE及NVIDIA Container Toolkit流程
之前写的[笔记] Ubuntu 18.04安装Docker CE及nvidia-docker2流程已经out了,以这篇为准. Docker的好处之一,就是在Container里面可以随意瞎搞,不用担心 ...
- Source 介绍
!!!1.Avro Source 监听AVRO端口来接受来自外部AVRO客户端的事件流. 利用Avro Source可以实现多级流动.扇出流.扇入流等效果. 另外也可以接受通过flume提供的Avro ...
- [转帖]忘记了MariaDB root密码的解决办法
忘记了MariaDB root密码的解决办法 https://www.cnblogs.com/liaojie970/p/6126322.html 貌似跟 mysql 是一样的. 1.停掉mariaDB ...