成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

MySQL8.0安裝


我們提供的服務有:網站制作、成都網站建設、微信公眾號開發(fā)、網站優(yōu)化、網站認證、三原ssl等。為千余家企事業(yè)單位解決了網站和推廣的問題。提供周到的售前咨詢和貼心的售后服務,是有科學管理、有技術的三原網站制作公司

0.環(huán)境:

os : CentOS release 6.10 (Final)

Msyql: MySQL8.0.14


1.下載官方打包好的二進制安裝包:


#wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.14-linux-glibc2.12-x86_64.tar.xz


8.0采用了新的.xz壓縮方式,文件很小,只有350M左右


2.解壓:

tar -xJvf mysql-8.0.14-linux-glibc2.12-x86_64.tar.xz


3.放到/usr/local下


[root@iceman local]# ln -s mysql-8.0.14-linux-glibc2.12-x86_64 mysql


4.配置參數文件 /etc/my.cnf


[mysqld]

server-id                      = 1

port                           = 3306

datadir                        = /data/mysql

socket                         = /tmp/mysql.sock

pid-file                       = /tmp/mysqld.pid

log-error                      = error.log

slow-query-log                 = 1

slow-query-log-file            = slow.log

long_query_time                = 0.2

log-bin                        = bin.log

binlog_format                 =ROW

character-set-client-handshake = FALSE

character-set-server           = utf8mb4

collation-server               = utf8mb4_unicode_ci

init_connect                   ='SET NAMES utf8mb4'

innodb_buffer_pool_size        = 200M

join_buffer_size               = 10M

sort_buffer_size               = 2M

read_rnd_buffer_size           = 2M

log_timestamps                 = SYSTEM


5.創(chuàng)建用戶和目錄

[root@iceman ~]# groupadd mysql

[root@iceman ~]# useradd -r -g mysql -s /bin/false mysql   ### /bin/false的意思是,禁止一起登錄行為

[root@iceman ~]# mkdir -p /data/mysql

[root@iceman ~]# chown -R mysql:mysql /data/mysql/

[root@iceman ~]# chmod -R 775 /data/mysql/


6.初始化數據庫:可以用--initialize-insecure不生成密碼

[root@iceman bin]# pwd

/usr/local/mysql/bin

[root@iceman bin]# ./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql


初始化的時候遇到如下兩個問題,用Yum 安裝上即可。


./mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

yum -y install libaio


./mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory

yum -y install numactl


7.設置啟動文件:

#cp /usr/local/mysql/support-files/mysql.server  /etc/init.d/mysql

--啟動數據庫:

# /etc/init.d/mysql start

Starting MySQL.Logging to '/data/mysql/error.log'.

 SUCCESS! 


8.修改環(huán)境變量


# vim /etc/profile.d/mysql.sh

export PATH=$PATH:/usr/local/mysql/bin


# source /etc/profile.d/mysql.sh 


9 .修改密碼

mysql> show databases;

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> 

mysql> 

mysql> alter user root@localhost identified by 'Hellxxxeiyun!@#$';

Query OK, 0 rows affected (0.01 sec)

本文題目:MySQL8.0安裝
當前地址:http://jinyejixie.com/article38/ggcgpp.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供App開發(fā)、用戶體驗、商城網站、微信小程序、App設計網站內鏈

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

h5響應式網站建設
永安市| 石泉县| 永春县| 湟中县| 综艺| 峨边| 离岛区| 屏边| 福泉市| 武威市| 大渡口区| 邓州市| 南郑县| 武穴市| 庆阳市| 彭泽县| 台江县| 甘南县| 梧州市| 墨脱县| 盘山县| 博罗县| 武定县| 尼木县| 赤城县| 承德县| 育儿| 东城区| 桓台县| 廉江市| 施秉县| 华坪县| 靖边县| 江永县| 钟祥市| 揭阳市| 文成县| 衡水市| 年辖:市辖区| 太谷县| 得荣县|