CENTOS 

MYSQL 5.7
下载MySQL 5.7
https://dev.mysql.com/downloads/mysql/5.7.html#downloads

cd /usr/local/src
解压安装和配置
文件夹 文件夹内容
/usr/bin 客户端和脚本
/usr/sbin Mysqld服务器
/var/lib/mysql 日志文件和数据库
/usr/share/info 信息格式的手册
/usr/share/man Unix手册
/usr/include/mysql 头文件
/usr/lib/mysl 库
/usr/share/mysql 错误信息、字符集、示例配置文件等 源代码安装需要一些开发工具
()cmake http://www.cmake.org/
()make http://www.gun.org/software/make/ 3.7.5+
()ansi c++ gcc 4.2.+
()perl 运行test版本所需要
()rpm rpm包管理器,rpmbuild 工具 yum list installed mysql
yum list installed mariadb
rpm -qa | grep "mysql\|mariadb"
rpm -e --nodeps mariadb
rpm -e --nodeps mysql yum install -y cmake make gcc-c++ perl wget wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz -P /usr/local/src tar -xvf mysql-5.7.-linux-glibc2.-x86_64.tar.gz mv mysql-5.7.-linux-glibc2.-x86_64/ mysql
mkdir /data && mv mysql /data/mysql groupadd mysql
useradd mysql -g mysql
mkdir -p /data/mysql && cd /data
chown -R mysql
chgrp -R mysql cp /etc/my.cnf /etc/my.cnf.bak echo '[mysqld]
basedir=/data/mysql
datadir=/data/mysql/data
socket=/tmp/mysql.sock
user=mysql
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
init_connect='SET NAMES utf8mb4'
lower_case_table_names =
port =
tmpdir = /tmp' > /etc/my.cnf cd /data/mysql/
./bin/mysqld --initialize --user=mysql --basedir=/data/mysql --datadir=/data/mysql/data .....
--11T04::.409894Z [Note] A temporary password is generated for root@localhost: N9YJ7swptw.X cd /data/mysql/support-files/ ./mysql.server start
Starting MySQL.Logging to '/data/mysql/data/localhost.localdomain.err'.
SUCCESS! cd /data/mysql/
./bin/mysql -uroot -p'N9YJ7swptw.X' mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7. Copyright (c) , , 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.
登录成功设置root密码:
mysql> set password=password('Huixst.9');
Query OK, rows affected, warning (0.00 sec)
设置远程连接:
mysql> GRANT ALL PRIVILEGES ON *.* TO root@'%' identified by 'Huixst.9';
Query OK, rows affected, warning (0.00 sec) mysql> flush privileges;
Query OK, rows affected (0.00 sec) mysql> \q
Bye cp /data/mysql/support-files/mysql.server /etc/init.d/mysqld
service mysqld stop
ln -s /data/mysql/bin/mysql /usr/bin/mysql
cd
service mysqld start
chkconfig --add mysqld
chkconfig --list mysqld
chkconfig mysqld on [root@localhost ~]# mysql -uroot -p'Huixst.9'
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7. MySQL Community Server (GPL) Copyright (c) , , 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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
rows in set (0.00 sec) mysql> create database cacti;
Query OK, row affected (0.00 sec) mysql> show create database cacti\G
*************************** . row ***************************
Database: cacti
Create Database: CREATE DATABASE `cacti` /*!40100 DEFAULT CHARACTER SET utf8mb4 */
row in set (0.00 sec) mysql> show create database cacti\g
+----------+-------------------------------------------------------------------+
| Database | Create Database |
+----------+-------------------------------------------------------------------+
| cacti | CREATE DATABASE `cacti` /*!40100 DEFAULT CHARACTER SET utf8mb4 */ |
+----------+-------------------------------------------------------------------+
row in set (0.00 sec) mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cacti |
| mysql |
| performance_schema |
| sys |
+--------------------+
rows in set (0.00 sec) mysql> drop database cacti;
Query OK, rows affected (0.00 sec) mysql> show engines\g
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
rows in set (0.00 sec) Support 为某种引擎状态
DEFAULT 当前为默认引擎
YES 可以使用
NO 不能使用

centos 7 源代码 mysql-5.7.2 安装的更多相关文章

  1. CentOS 7数据库mysql和mariadb手动安装冲突的问题解决

    由于确定使用mysql,那只有卸载mariadb了. 一.首先查看当前安装的mariadb包 rpm -qa|grep mariadb 本人得到结果是:mariadb-libs-5.5.44-2.el ...

  2. CentOS 6.6 MySQL 8.0详细安装步骤

    1.备份服务器上MySQL数据库 [root@localhost ] # mysqldump -h localhost -u root -proot --databases Surpass --rou ...

  3. 1分钟完美安装最新CentOS+Nginx+PHP-FPM+MySQL

    PHP 5.3.1 MySQL 5.0.89 Nginx 0.8.33 或 0.7.65 (可选) 现在,我们可以快速全自动搞定 CentOS + Nginx + PHP-FPM + MySQL 的安 ...

  4. CentOS 6.6 下源码编译安装MySQL 5.7.5

    版权声明:转自:http://www.linuxidc.com/Linux/2015-08/121667.htm 说明:CentOS 6.6 下源码编译安装MySQL 5.7.5 1. 安装相关工具# ...

  5. CentOS 5.5 Nginx+JDK+MySQL+Tomcat(jsp)成功安装案例

    在CentOS 5.5中安装Nginx+jdk+mysql+tomcat是非常容易的.只需yum安装环境包和nginx.解压安装jdk和tomcat.配置profile文件.server.xml和ng ...

  6. CentOS学习笔记--MySQL安装

    MySQL安装 Linux中使用最广泛的数据库就是MySQL,使用在线yum的方式安装的版本落后MySQL网站好几个小版本,本节亲自测试安装新版的MySQL. 测试机器环境: VMware Works ...

  7. CentOS下MySQL 5.7编译安装

    CentOS下MySQL 5.7编译安装   文章目录 安装依赖包 下载相应源码包 添加mysql用户 预编译 编译安装 启动脚本,设置开机自启动 /etc/my.cnf,仅供参考 初始化数据库 设置 ...

  8. centos mysql 数据存储目录安装位置

    rpm -ql mysql查看安装位置 MYSQL默认的数据文件存储目录为/var/lib/mysql.假如要把目录移到/home/data下需要进行下面几步: 1.home目录下建立data目录 c ...

  9. Centos 升级MySQL版本或者Yum安装Mysql5.6

    Centos 升级MySQL版本或者Yum安装Mysql5.6 1.从MySQL Yum仓库下载最新的rpm文件:http://dev.mysql.com/downloads/repo/yum/Cen ...

  10. CentOS下的Mysql的安装和使用

    1.使用安装命令 :yum -y install mysql mysql-server mysql-devel 安装完成却发现Myserver安装缺失,在网上找原因,原来是因为CentOS 7上把My ...

随机推荐

  1. R语言与概率统计(三) 多元统计分析(中)

    模型修正 #但是,回归分析通常很难一步到位,需要不断修正模型 ###############################6.9通过牙膏销量模型学习模型修正 toothpaste<-data. ...

  2. vue路由传参的几种基本方式

    原文地址 this.$router.push跳转 现有如下场景,点击父组件的li元素跳转到子组件中,并携带参数,便于子组件获取数据.父组件中: <li v-for="article i ...

  3. Django组件-admin

    一. admin组件的使用 Django 提供了基于 web 的管理工具. Django 自动管理工具是 django.contrib 的一部分.你可以在项目的 settings.py 中的 INST ...

  4. springboot整合es客户端操作elasticsearch(四)

    对文档查询,在实际开发中,对文档的查询也是偏多的,记得之前在mou快递公司,做了一套事实的揽件数据操作,就是通过这个来存储数据的,由于一天的数据最少拥有3500万数据 所以是比较多的,而且还要求查询速 ...

  5. Spring+SpringMvc+Hibernate整合记录

    Spring+SpringMvc+Hibernate+Maven整合各大配置文件记录 1.Idea新建的Maven架构 2.Maven的对象模型的内容 <project xmlns=" ...

  6. [转帖]加强Linux服务器安全的20项建议

    加强Linux服务器安全的20项建议 2017-10-19 22:15:01作者:Linux编辑稿源:系统极客 https://ywnz.com/linuxyffq/99.html 一般情况下用 Li ...

  7. Redis(1.7)Redis高可用架构(理论篇)

    [0]常用架构种类 (0.1)单机Redis (0.2)单纯的Redis主从复制 (0.3)哨兵Sentinel+Redis主从复制集群(实现高可用自动故障转移) (0.4)Redis Cluster ...

  8. Oracle-DQL 1- select基础

    说明:语句中说到的“表”,以及表中有哪些“列”自行脑补......重要的是理解概念,能看懂语句代表的含义就可以了~ DQL-数据查询语句: 1.* 表示所有列SELECT * FROM emp; 2. ...

  9. Centos修改时间

    1. 普通用户 a. 获取超级用户root权限 命令:su或者su -或者su - root b. passwd 用户名 2. 超级用户 a. 打开system-auth文件 命令:vi /etc/p ...

  10. IDEA连接 Oracle数据库

    package com.zxx.util;import org.apache.commons.dbutils.DbUtils;import java.sql.Connection;import jav ...