20的教程详解,18的教程详解

作者:计算机知识

CentOS陆.5下安装Mysql伍.7.1八,首先先下载mysql-伍.七.1八-linux-glibc2.五-x8陆_64.tar.gz,传到CentOS陆.5系统下的/usr/local目录下,实行如下命令

RedHat六.5/CentOS陆.5安装Mysql五.柒.20的课程详解,

下载rpm安装包

Mysql官网:

选拔版本下载:

图片 1

能够选拔wget命令下载:

[[email protected] opt]#wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar

瞩目RedHat的本子和体系位数。

查阅正视的库

[[email protected] opt]# yum search libaio
[[email protected] opt]# yum install libaio

翻开系统在此以前是还是不是有安装过mysql相关版本

[[email protected] opt]# rpm -qa | grep mysql
[[email protected] opt]# rpm -qa | grep mariadb

图片 2

有则删除,有多少个删除多少个

[[email protected] opt]# rpm -e mariadb-libs-5.5.44-2.el7.x86_64 --nodeps

安装

遵照顺序安装软件包

[[email protected] opt]# rpm -ivh mysql-community-common-5.7.20-1.el6.x86_64.rpm
[[email protected] opt]# rpm -ivh mysql-community-libs-5.7.20-1.el6.x86_64.rpm
[[email protected] opt]# rpm -ivh mysql-community-client-5.7.20-1.el6.x86_64.rpm
[[email protected] opt]# rpm -ivh mysql-community-server-5.7.19-1.el7.x86_64.rpm

创办mysql用户和用户组

[[email protected] /]# groupadd mysql
[[email protected] /]# useradd -r -g mysql -s /bin/false mysql

创立mysql数据存放目录

[[email protected] /]# mkdir -p /data/mysql
[[email protected] /]# chown mysql.mysql /data/mysql
[[email protected] /]# ll -d /data/mysql/
drwxr-xr-x. 2 mysql mysql 6 9月 17 17:37 /data/mysql/

修改/etc/my.cnf配置文件

[mysqld]
init-connect='SET NAMES utf8mb4'
default-storage-engine=INNODB
character-set-server=utf8mb4
datadir=/data/mysql
socket=/var/lib/mysql/mysql.sock
assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
validate_password=off
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
lower_case_table_names=1
[mysql]
default-character-set = utf8mb4
[client]
default-character-set = utf8mb4

初始化mysql

[[email protected] /]# /usr/sbin/mysqld --initialize --user=mysql

翻开开始化密码

[[email protected] /]# grep "[email protected]" /var/log/mysqld.log

签到mysql并修改密码

mysql> set password = password('123456');

允许远程访问(不推荐)

mysql> use mysql; 
mysql> select host,user,password from user; 
mysql> update user set password=password('xxxxxx') where user='root'; 
mysql> update user set host='%' where user='root' and host='localhost'; 
mysql> flush privileges;

总结

以上所述是我给大家介绍的RedHat陆.5/CentOS陆.五安装Mysql伍.7.20的教程详解,希望对大家享有扶助,如果我们有别的疑问请给本身留言,俺会及时还原大家的。在此也特别感激大家对帮客之家网址的支撑!

下载rpm安装包 Mysql官网: 采用版本下载: 可以动用wget命令下载:...

下载rpm安装包

CentOS6.九 Mysql5.7.1八源码安装教程

  CentOS陆.玖 Mysql5.七.1八源码安装,以下操作均在root用户下试行。

  1、安装依赖工具

  cmake make3.75 gcc4.4.6 Boost1.59.0 bison ncurses

  yum install -y cmake,make,gcc,gcc-c ,bison, ncurses,ncurses-devel

  cd /opt

  wget

  或然向度娘要一个

  tar -zxvf boost_1_59_0.tar.gz -C /usr/local/

  二、下载mysql打算安装

  git clone

  没有git就 yum install git装一个

  选择5.7

  创设mysql用户,用户组为root

  useradd -r -g root -s /bin/false mysql

  3、执行cmake

  cd /opt/mysql-server5.7

  cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql

  -DMYSQL_DATADIR=/usr/local/mysql/data

20的教程详解,18的教程详解。  -DWITH_BOOST=/usr/local/boost_1_59_0

  -DMYSQL_UNIX_ADDR=/tmp/mysql.sock

  -DSYSCONFDIR=/etc

  -DEFAULT_CHARSET=utf8

  -DDEFAULT_COLLATION=utf8_general_ci

  -DENABLED_LOCAL_INFILE=1

  -DEXTRA_CHARSETS=all

  -DCMAKE_INSTALL_PREFIX:安装路线-DMYSQL_DATADIPAJERO:数据存放目录-DWITH_BOOST:boost源码路线-DSYSCONFDI索罗德:my.cnf配置文件目录-DEFAULT_CHALX570SET:数据库暗许字符编码-DDEFAULT_COLLATION:私下认可排序规则-DENABLED_LOCAL_INFILE:允许从本文件导入数据-DEXTRA_CHAPRADOSETS:安装具备字符集 四、编写翻译安装

  make -j `grep processor /proc/cpuinfo | wc -l`

  make install

  -j参数表示依据CPU核数内定编写翻译时的线程数,能够加快编写翻译速度。

  假设中途编写翻译失败了,必要删除cmake生成的预编写翻译配置参数的缓存文件和make编写翻译后生成的文件,再重复编写翻译。

  cd /opt/mysql-server5.7

  rm -f CMakeCache.txt

  make clean

  伍、初叶化系统数据库

  vim /etc/my.cnf

  进入insert方式,将原本内容替换来如下内容:  CentOS6.九 Mysql伍.七.1捌源码安装教程

  [client]

  port=3306

  socket=/temp/mysql.sock

  [mysqld]

  character-set-server=utf8

  collation-server=utf8_general_ci

  skip-external-locking

  skip-name-resolve

  user=mysql

  port=3306

  basedir=/usr/local/mysql

  datadir=/usr/local/mysql/data

  tmpdir=/usr/local/mysql/temp

  # server_id = .....

  socket=/usr/local/mysql/mysql.sock

  log-error=/usr/local/mysql/logs/mysql_error.log

  pid-file=/usr/local/mysql/mysql.pid

  open_files_limit=10240

  back_log=600

  max_connections=500

  max_connect_errors=6000

  wait_timeout=605800

  #open_tables=600

  #table_cache = 650

  #opened_tables = 630

  max_allowed_packet=32M

  sort_buffer_size=4M

  join_buffer_size=4M

  thread_cache_size=300

  query_cache_type=1

  query_cache_size=256M

  query_cache_limit=2M

  query_cache_min_res_unit=16k

  tmp_table_size=256M

  max_heap_table_size=256M

  key_buffer_size=256M

  read_buffer_size=1M

  read_rnd_buffer_size=16M

  bulk_insert_buffer_size=64M

  lower_case_table_names=1

  default-storage-engine=INNODB

  innodb_buffer_pool_size=2G

  innodb_log_buffer_size=32M

  innodb_log_file_size=128M

  innodb_flush_method=O_DIRECT

  #####################

  thread_concurrency=32

  long_query_time=2

  slow-query-log=on

  slow-query-log-file=/usr/local/mysql/logs/mysql-slow.log

  [mysqldump]

  quick

  max_allowed_packet=32M

  [mysqld_safe]

  log-error=/var/log/mysqld.log

  pid-file=/var/run/mysqld/mysqld.pid

  cd /usr/local/mysql

  mkdir data

  mkdir logs

  mkdir temp

  chmod 0770 -R .

  ./mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql --socket=/tmp/mysql.sock

  在MySQL 伍.7.6本子从前是 bin/mysql_install_db --user

  实行到位后,查看 logs/mysql_error.log文件,将里面包车型地铁临时root密码记下来

  A temporary password is generated for [email protected]: xxxxxxxxxx

  6、配置mysql

  chkconfig --add mysqld # 加多到系统服务

  chkconfig mysqld on # 开机运行

  service mysqld start运营不成功,使用safe格局运营

  chown -R mysql:root /var/run/mysqld

  ./bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql &

  ./mysql -uroot -p

  输入mysql_error.log中的不常密码登陆mysql调整台

  set password='asdfghjkl'';

  Query OK, 0 rows affected (0.00 sec)

  show warnings;

  停止mysql

  mysqladmin -u root -p shutdown

  输入刚才设置的密码,结束成功

  接下去能够采纳系统服务来运转mysql了:

  service mysqld start # 启动mysql服务

CentOS陆.玖 Mysql5.7.1捌源码安装,以下操作均在root用户下执行。 一、安装重视工具 cmake make三.75 gcc四.四.陆 Boost一.5玖.0 bi...

yum search libaio # search for info
yum install libaio # install library
groupadd mysql
useradd mysql -g mysql
tar -zxvf /usr/local/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.18-linux-glibc2.5-x86_64/ mysql
cd mysql/
mkdir data
cd ../
chown -R mysql:mysql mysql/
chmod -R 755 mysql/
cd mysql
./bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --initialize

Mysql官网:

寻找密码,一般在指令的末段,

选料版本下载:

2017-04-21T02:36:15.620346Z 1 [Note] A temporary password is generated for root@localhost: o*s#gqh)F4Ck


./support-files/mysql.server start
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
service mysqld restart
mysql -uroot -po*s#gqh)F4Ck
alter user 'root'@'localhost' identified by 'newpswd'
update user set user.Host='%' where user.User='root';
flush privileges;

图片 3

以上所述是笔者给大家介绍的CentOS6.伍下安装Mysql伍.7.18的课程详解,希望对大家有着支持,假诺大家有任何疑问请给自个儿留言,小编会及时恢复大家的。在此也特别多谢大家对台本之家网址的支撑!

能够运用wget命令下载:

你或然感兴趣的篇章:

  • centos 6.5下 mysql-community-server. 5.7.18-1.el6安装
  • CentOS 7中源码安装MySQL 5.7.陆 详细教程
  • CentOS陆.伍 上配备 MySQL5.7.一7二进制安装以及多实例配置
  • RedHat陆.5/CentOS陆.5安装Mysql伍.柒.20的教程详解
  • Centos陆.5编写翻译安装mysql 伍.柒.1四详实教程
  • Centos7.三下mysql5.7.18设置并修改初叶密码的方法
  • CentOS MySQL 伍.柒编写翻译安装步骤详细表达
  • CentOS 7下mysql 5.七安装教程
  • CentOS6.玖下mysql 伍.7.一七装置配置形式图像和文字化教育程
  • CentOS 陆、柒下mysql 五.7详细安装教程
[root@localhost opt]#wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar

留意RedHat的本子和种类位数。

翻看依赖的库

[root@localhost opt]# yum search libaio
[root@localhost opt]# yum install libaio

本文由bwin必赢发布,转载请注明来源

关键词: 必赢亚洲bwin09