MySQL5.6.35部署
1、下载软件
[root@localhost src]# wget -q http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
2、解压、移动
[root@localhost /]# yum -y install gcc gcc-c++ zlib-devel libtool ncurses-devel libxml2-devel cmake
[root@localhost /]# useradd -s /sbin/nologin -M mysql
[root@localhost /]# mkdir -p /usr/local/mysql
[root@localhost /]# mkdir -p /usr/local/mysql/data/mysql
[root@localhost /]# cd /usr/local/src/
[root@localhost src]# pwd
/usr/local/src
[root@localhost src]# ls
mysql-5.6.-linux-glibc2.-x86_64.tar.gz
[root@localhost src]# tar xf mysql-5.6.-linux-glibc2.-x86_64.tar.gz
[root@localhost src]# cd mysql-5.6.
3、编译、安装
[root@localhost mysql-5.6.]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data/mysql -DWITH_INNOBASE_STORAGE_ENGINE= -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
[root@localhost mysql-5.6.]# make
[root@localhost mysql-5.6.]# make install
[root@localhost mysql-5.6.]# echo $? [root@localhost mysql-5.6.]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
[root@localhost mysql-5.6.]# chmod +x /etc/init.d/mysqld
[root@localhost mysql-5.6.]# chown -R mysql:mysql /usr/local/mysql/data/mysql
[root@localhost mysql-5.6.]# chown -R mysql:mysql /usr/local/mysql/
4、初始化数据库
[root@localhost mysql-5.6.]# cd /usr/local/mysql/scripts/
[root@localhost scripts]# pwd
/usr/local/mysql/scripts
[root@localhost scripts]# ./mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/mysql
[root@localhost scripts]# cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
cp: overwrite `/etc/my.cnf'? y [root@liveneo- scripts]# vim /etc/my.cnf
# port = .....
# server_id = .....
# socket = ..... datadir = /usr/local/mysql/data/mysql
port =
server_id =
socket = /usr/local/mysql/mysql.sock # Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
lower_case_table_names =
wait_timeout=
log_bin_trust_function_creators=
max_connections=
5、配置环境变量
[root@localhost scripts]# vim /etc/profile
export PATH=$PATH:/usr/local/mysql/bin
[root@localhost scripts]# source /etc/profile
[root@localhost scripts]# /etc/init.d/mysqld start
Starting MySQL. SUCCESS!
[root@localhost scripts]# netstat -nlpt | grep mysql
tcp ::: :::* LISTEN /mysqld
[root@liveneo- mysql]# ls
bin COPYING data docs include lib man my.cnf mysql.sock mysql-test README scripts share sql-bench support-files
[root@localhost scripts]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.6. Source distribution 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 |
| test |
+--------------------+
rows in set (0.00 sec) mysql> exit
Bye
6、给root设置密码
[root@localhost scripts]# mysqladmin -uroot password ""
Warning: Using a password on the command line interface can be insecure.
[root@localhost scripts]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.6. Source distribution 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>
mysql>
mysql> exit
Bye
7、创建远程连接用户并授权
[root@localhost scripts]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.6. Source distribution 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> CREATE USER 'user'@'%' IDENTIFIED BY '';
Query OK, rows affected (0.00 sec) mysql> GRANT ALL ON *.* TO 'user'@'%';
Query OK, rows affected (0.00 sec) mysql>
MySQL5.6.35部署的更多相关文章
- [Deepin 15] 编译安装 MySQL-5.6.35
在 Ubuntu 下,先前一直是 二进制包解压安装,详情参考: http://www.cnblogs.com/52php/p/5680906.html 现改为 源码编译安装: #!/bin/bash ...
- Centos编译安装 LAMP (apache-2.4.7 + mysql-5.5.35 + php 5.5.8)+ Redis
转载地址:http://www.cnblogs.com/whoamme/p/3530056.html 软件源代码包存放位置:/usr/local/src 源码包编译安装位置:/usr/local/软件 ...
- 64位CentOs7源码安装mysql-5.6.35过程分享
首先安装依赖包,避免在安装过程中出现问题 [root@bogon liuzhen]# yum -y install gcc gcc-c++[root@bogon liuzhen]# yum -y in ...
- CentOS6.5源码安装MySQL5.6.35
CentOS6.5源码安装MySQL5.6.35 一.卸载旧版本 1.使用下面的命令检查是否安装有mysql [root@localhost tools]# rpm -qa|grep -i mysql ...
- CentOS6.5下RPM包安装MySQL5.6.35
基本环境:VMware10.0+CentOS6.5+MySQL5.6.35 .查看操作系统相关 shell> cat /etc/issue shell> uname -a .创建需要下载r ...
- CentOS6.5下源码安装MySQL5.6.35
接上一篇文章使用RPM包安装MySQL,确实很方便.但是安装后却不知道各文件保存在哪个文件夹下!尝试使用源码安装~本文主要参考:CentOS 6.4下编译安装MySQL 5.6.14一.卸载旧版本 . ...
- 在CentOs7源码安装mysql-5.6.35单实例数据库
首先安装依赖包,避免在安装过程中出现问题 [root@bogon liuzhen]# yum -y install gcc gcc-c++[root@bogon liuzhen]# yum -y in ...
- 一分钟完成MySQL5.7安装部署
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://suifu.blog.51cto.com/9167728/1855415 Part ...
- centos6.8下LNMP (nginx1.8.0+php5.6.10+mysql5.6.12) - 部署手册
在平时运维工作中,经常需要用到LNMP应用框架.以下对LNMP环境部署记录下: 1)前期准备:为了安装顺利,建议先使用yum安装依赖库[root@opd ~]#yum install -y make ...
随机推荐
- jeecg中一对多的关系映射
1.首先看一张前端页面: 有一张主表和3张子表,显示这3张子表的代码如下 <t:tabs id="tt" iframe="false" tabPositi ...
- UCML 2.0 For ASP.NET开发平台简介
互联网时代,我们能跟上网络变革的步伐吗?我们的产品领先于竞争对手吗?我们能够满足日益个性化的客户需求吗? 采用新的软件开发方法是我们的首要选择. 第一个全面支持ASP.NET的应用框架开发平台诞生了— ...
- 2DAY初识python
一.变量 1 什么是变量之声明变量 #变量名=变量值 age=18 gender1='male' gender2='female' 2 为什么要有变量 变量作用:“变”=>变化,“量”=> ...
- POJ2739(尺取法)
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23931 ...
- 页面初始加载的是默认刷新一次(f5)
参考找不到了,不好意思.. 两种可以都试一下,解决问题就好了. 1.----------- <script type="text/javascript"> window ...
- JNI的一个简单实例
本例子使用的操作系统MacOS, 64位JVM. JNI编写的几个步骤如下: 编写Java代码,并注明native方法: public class HelloJni { public native v ...
- Linux 文件描述符详解
Overview 了解Linux怎样处理输入和输出是非常重要的.一旦我们了解其原理以后,我们就可以正确熟练地使用脚本把内容输出到正确的位置.同样我们也可以更好地理解输入重定向和输出重定向. Linux ...
- request和response的复习
客户端发来的请求,服务器将请求封装成request对象,包括请求头和请求的数据等.创建response对象,调用Servlet的Service()方法传递这两个参数,使用HttpServlet就是将这 ...
- fir 窗口设计法
加窗的原因.对于理想的低通滤波器H(exp(jw)),其h(n)是无限长序列.这是可以证明的.因此为了得到有限长的h(n)就需要截断,而这个过程就是加窗.由于h(n)截断即其频率响应就和理想的低通滤波 ...
- PyCharm下载与安装
进入PyCharm官网 1.点击下载Community 2.选择下载路径,点击“下载” 3.双击安装包,进行安装 4. 5.选择安装路径 6.根据实际情况选择32或64位 7. 8. 9.安装完成