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 ...
随机推荐
- RedHat6.5用ISO配置yum源
CentOS自带强大的yum功能,默认为从网上自动下载rpm包,对于网速不太给力或者没有网络的情况下需要用的话就不是很方便,很多软件尤其是服务器上的软件我们么有必要追求最新,稳定性最重要,这里我们用C ...
- 瞎记录java (含this 的用法)
为类加一个方法: vid 方法名() 或者向下面这样写 给类加一个函数: 引用类里面的方法 引用不同类的方法: 其中 extends 应该是 本类可以去调用其他类里面的方法 的意思
- [转]Jsp 映射
<servlet> <servlet-name>SimpleJspServlet</servlet-name> <jsp-file>/jsp/simpl ...
- 初学者手册-Sublime Text常用快捷键
Alt + F3 :找出当前文档中所有被划选的词语,若文档很大的话,可能会导致Sublime Text崩溃. Ctrl + kkk :删除当前行光标至行尾的所有内容. End: 光标跳至行尾. Hom ...
- Django跳转
跳转问题 如果我现在停留在文章的详情页,用户未登陆,如果你要评论,或者点赞就应该回到登陆页面登陆 如果登陆成功了,就要返回到当初跳转过来的页面 第一种通过前后端传送数据 $('.hit').click ...
- 用户的 添加 权限 MySql远程登录
添加一个用户 '; 为这个叫mongo的用户赋予操作z_0811数据库的所有权限 '; mysql如何修改开启允许远程连接 关于mysql远程连接的问题,大家在公司工作中,经常会遇到mysql数据 ...
- FreeRADIUS 、DaloRADIUS 搭建记录
一. 安装环境 系统环境:centos6.5 IP:192.168.30.242 hostname:vpn.org 软件:PPTP.LAMP均已安装.(请确保这些正常安装,并能使用). 二. 软件 ...
- [Python] Argparse module
he recommended command-line parsing module in the Python standard library 1. Basic import argparse p ...
- WEB服务重要基础
1.1用户访问房展基本流程 我们每天都会使用Web客户端上网浏览网页.最常见Web客户端就是Web浏览器,如通过的微软InternetExplorer(IE)以及技术人员偏爱的火狐浏览器.谷歌浏览器等 ...
- array,vector对象 数组越界检测