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. lumen怎么得到当前Uri的控制器、Action、路由规则

    <?php namespace App\Http\Controllers; class HelloController extends Controller { public function ...

  2. What happens when you type an URL in the browser and press enter?

    What happens when you type an URL in the browser and press enter? 1. You type maps.google.com into t ...

  3. centos 设置dns

  4. CRLF注入漏洞

    CRLF是“回车+换行”(\r\n,%0d%0a)的简称. HTTP协议中,HTTP Header之间以一个CRLF分隔,Header与Body以两个CRLF分隔.URL重定向通常通过响应头中的Loc ...

  5. 【VS开发】list控件的InsertColumn方法出错

    今天在写一个获取磁盘信息的小程序,通过list控件显示各磁盘信息.我在属性页(CPropertyPage)的构造函数中,调用list控件的InsertColumn方法,编译链接都通过了,但运行时冒出了 ...

  6. Windows多线程编程入门笔记

    每次处理并行任务时,如果要等待用户输入或依赖外部(如与灿亨控制器响应),就应该为类似的操作单独创建一个线程,这样我们的程序才不会挂起无响应. 静态库和动态库 静态库是指在程序运行前就编译完成的库,如# ...

  7. [转帖]【架构系列】龙芯loongson简介

    [架构系列]龙芯loongson简介 https://blog.csdn.net/SoaringLee_fighting/article/details/97759305 2019年07月30日 10 ...

  8. [转帖] ./demoCA/newcerts: No such file or directory openssl 生成证书时问题的解决.

    接上面一篇blog 发现openssl 生成server.crt 时有问题. 找了一个网站处理了一下: http://blog.sina.com.cn/s/blog_49f8dc400100tznt. ...

  9. js报Uncaught SyntaxError: Unexpected token <错误 解决方法

    js报Uncaught SyntaxError: Unexpected token <错误 解决方法 错因 js被shiro的拦截器拦下,访问不了 #shiro的配置 shiro: hash-a ...

  10. C++str.Format

    C++应该没有这个函数,说的是Format是在MFC程序里看见的 Format是CString字符串类的成员函数CString::Format( LPCTSTR lpszFormat, ... ); ...