linux安装glibc版mysql,实测成功 333333333333333
来源:互联网 发布:阿尔法收益 知乎 编辑:程序博客网 时间:2024/05/18 00:13
废话少说:
一.准备工作:
1.添加mysql用户组
# groupadd mysql
2.添加mysql用户
# useradd -g mysql mysql
-g 指定用户组
二.正文:
1.下载mysql glibc版 http://dev.mysql.com/downloads/mysql/
选择Linux-Generic 64位tar.gz版本
linux用户 : wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
2.解压mysql 并移动到usr/local/下
# tar zxvf mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
# mv mysql-5.7.16-linux-glibc2.5-x86_64 /usr/local/mysql
创建data文件夹
# mkdir data
3.改变文件夹所有者
# chown -R mysql /usr/local/mysql
# chgrp -R mysql /usr/local/mysql
4.安装mysql
# cd /usr/local/mysql #进入安装目录
# cd ../bin
# ./mysql_install_db
--user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
[WARNING] mysql_install_db
is
deprecated. Please consider switching
to
mysqld
--initialize 2015-11-10 02:09:23
[WARNING] The bootstrap log isn't empty: 2015-11-10 02:09:23
[WARNING] 2015-11-10T10:09:18.114182Z 0
[Warning]
--bootstrap is deprecated. Please consider using --initialize instead 2015-11-10T10:09:18.129343Z 0
[Warning] Changed limits: max_open_files: 1024 (requested 5000) 2015-11-10T10:09:18.129408Z 0
[Warning] Changed limits: table_open_cache: 431 (requested 2000)
mysql5.7新特性:由上面可以看出, mysql_install_db 已经不再推荐使用了,建议改成 mysqld --initialize 完成实例初始化
# ./mysqld
--user=mysql--basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
--initialize
[Warning]
TIMESTAMP
with
implicit
DEFAULT
value
is
deprecated. Please use
--explicit_defaults_for_timestamp server option (see documentation for more details). 2016-04-08T01:47:59.945537Z 0
[Warning] InnoDB: New log files created, LSN=45790 2016-04-08T01:48:00.333528Z 0 [Warning] InnoDB: Creating
foreign
key
constraint
system tables. 2016-04-08T01:48:00.434908Z 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: ece26421-fd2b-11e5-a1e3-00163e001e5c. 2016-04-08T01:48:00.440125Z 0
[Warning] Gtid
table
is
not
ready
to
be used.
Table
'mysql.gtid_executed'
cannot be opened. 2016-04-08T01:48:00.440904Z 1
[Note] A
temporary
password
is
generated
for
root@localhost:**mjT,#x_5sW
5.测试安装
# cd /usr/lcoal/mysql/
support-files
# ./mysql.server start
显示
start Starting MySQL.. OK!说明成功
# cd /usr/local/mysql/support-files
# cp my-
default
.cnf /etc/my.cnf
配置my.cnf
vim /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
port = 3306
# server_id = ...
socket = /tmp/mysql.sock
pid-file = /usr/local/mysql/mysql.pid
max_connections = 1500
read_buffer_size = 2M
character_set_server=utf8
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
# 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
[client]
default-character-set=utf8
7.设置mysql开机自启动
support-files
/mysql.server /etc/init.d/mysqld/# chmod 755 /etc/init.d/mysqld # 增加执行权限
# chkconfig
--list mysqld # 检查自启动项列表中没有mysqld这个,
# chkconfig
--add mysqld # 如果没有就添加mysqld:
# chkconfig mysqld
on
# 用这个命令设置开机启动:
至此mysql全部安装完毕
运行命令:service mysqld start 启动mysql
# ./usr/local/mysql/bin/mysql -uroot -p
PASSWORD:
输入刚产生的临时密码**mjT,#x_5sW
修改 root 密码 set password for 'root'@'localhost' = '你的密码'
ok!
- linux安装glibc版mysql,实测成功 333333333333333
- windows安装配置mysql实测成功
- 基于 Linux 安装glibc版mysql 5.7.12
- linux 安装 mysql 的 glibc 包
- CentOS7安装mysql-5.7(glibc版)
- CentOS7安装mysql-5.7(glibc版)
- CentOS7安装mysql-5.7(glibc版)
- linux安装glibc
- Linux上安装MySQL(glibc版)并配置多实例(mysqld_multi)
- centOS安装mysql---glibc方式
- linux下编译安装glibc
- Linux查看glibc安装版本
- linux下glibc-2.14安装
- 普通电视盒子安装绑定迅雷远程下载,实测成功
- centos 7 linux系统安装 mysql5.7.17(glibc版)
- Linux下glibc版MySQL5.7.20的安装
- linux x86_64 下安装glibc的问题
- 安装glibc
- 不断重置的前端人生
- Android性能优化第(三)篇---MAT比Menmery Monitor更强大
- java学习日记_92:IO流之递归算法
- scala函数式编程使用示例
- Yii2.0-advanced-8—主题配置(themes)
- linux安装glibc版mysql,实测成功 333333333333333
- 需要了解的注解
- Mac OS X上搭建本地SVN服务器
- 自定义navigation(导航栏)
- activity生命周期分析
- 物理内存 虚拟内存
- 替换空格
- 深入浅出Docker(五):基于Fig搭建开发环境
- Android性能优化第(四)篇---Allaction Tracing追踪内存分配的轨迹