国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

Linux下安裝mysql-8.0.21-linux-glibc2.12-x86_64.tar安裝過程

2024-07-24 12:32:02
字體:
供稿:網(wǎng)友
       Linux下安裝mysql-8.0.21-linux-glibc2.12-x86_64.tar安裝過程:

 1、解壓mysql mysql-8.0.21-linux-glibc2.12-x86_64.tar
 
      解壓
 
      tar -xvf mysql-8.0.21-linux-glibc2.12-x86_64.tar
 
     tar -xvJf mysql-8.0.21-linux-glibc2.12-x86_64.tarr.xz
 
2、cp -r  mysql-8.0.21-linux-glibc2.12-x86_64 mysql8.21/
 
3、添加用戶組 groupadd mysql
 
4、添加用戶積所屬用戶組 useradd -g mysql mysql
 
5、查看添加是否成功 id mysql
 
6. 初始化
 
     bin/mysqld --initialize --user=mysql --basedir=/mysql/mysql8.21 --datadir=/mysql/mysql8.21/data
 
      ./mysqld --initialize --user=mysql --basedir=/mysql/mysql8.21 --datadir=/mysql/mysql8.21/data
 
2020-07-15T01:36:10.855350Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
 
2020-07-15T01:36:10.855903Z 0 [System] [MY-013169] [Server] /mysql/mysql8.21/bin/mysqld (mysqld 8.0.21) initializing of server in progress as process 151504
 
2020-07-15T01:36:10.930218Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
 
2020-07-15T01:36:13.983064Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
 
2020-07-15T01:36:16.019130Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: u?B7*9O9&#uj
 
記錄上步驟的臨時(shí)登錄密碼 root@localhost: 2fZkV6HGCi?
 
7.配置參數(shù)文件my.cnf
 
vi /mysql/mysql8.21/support-files/my.cnf
 
[mysqld]
 
port = 3308
 
socket = /mysql/mysql8.21/run/mysql.sock
 
datadir = /mysql/mysql8.21/data
 
basedir=/mysql/mysql8.21/
 
default_storage_engine = InnoDB
 
max_connections = 2048
 
open_files_limit = 65535
 
max-connect-errors=100000
 
skip-name-resolve
 
character-set-server=utf8
 
log-error =mysql_error.log
 
log-bin =/mysql/mysql8.21/log/master-bin
 
log-bin-index=/mysql/mysql8.21/log/master-bin.index
 
slow_query_log = 1
 
slow_query_log_file =/mysql/mysql8.21/log/mysql_slow_query.log
 
long_query_time = 10
 
relay_log = /mysql/mysql8.21/log/master-relay-bin
 
server-id=101
 
relay-log-info-repository=TABLE
 
master-info-repository=TABLE
 
sync_binlog=1
 
sync_relay_log=1
 
log_slave_updates=1
 
8.創(chuàng)建RSA private key bin/mysql_ssl_rsa_setup --datadir=/mysql/mysql8.21/data
 
9.如果初始密碼忘了(root)
 
可以啟動mysql跳過Mysql密碼驗(yàn)證
 
/mysql/mysql8.21/bin/mysqld_safe --defaults-file=/mysql/mysql8.21/support-files/my.cnf --skip-grant-tables
 
use mysql;
 
update user set authentication_string='' where user='root';
 
把密碼重置為空(此時(shí)還不能直接修改密碼,必須先設(shè)置為空,否則會報(bào)錯)
 
啟動mysql 修改密碼
 
alter user 'root'@'localhost' identified by 'mysql8.21';
 
10、 更新域?qū)傩裕?#39;%'表示允許外部訪問:
 
mysql> use mysql
 
Reading table information for completion of table and column names
 
You can turn off this feature to get a quicker startup with -A
 
Database changed
 
mysql> update user set host='%' where user ='root';
 
Query OK, 1 row affected (0.11 sec)
 
Rows matched: 1  Changed: 1  Warnings: 0
 
mysql> FLUSH PRIVILEGES;
 
Query OK, 0 rows affected (0.01 sec)
 
mysql> select host,user,plugin from user;
 
+-----------+------------------+-----------------------+
 
| host      | user             | plugin                |
 
+-----------+------------------+-----------------------+
 
| %         | root             | caching_sha2_password |
 
| localhost | mysql.infoschema | caching_sha2_password |
 
| localhost | mysql.session    | caching_sha2_password |
 
| localhost | mysql.sys        | caching_sha2_password |
 
11、授權(quán)
 
mysql>  GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION;
 
Query OK, 0 rows affected (0.34 sec)
 
12、 mysql8.0以上 引入了新特性 caching_sha2_password;
 
這種密碼加密方式Navicat 12以下客戶端不支持;解決方法
 
 修改加密方式
 
update user set plugin='mysql_native_password' where user='root'; 

(編輯:武林網(wǎng))

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 青海省| 二连浩特市| 噶尔县| 滦平县| 湖北省| 五指山市| 夏津县| 保亭| 大庆市| 北安市| 扶余县| 辽阳市| 元江| 平泉县| 镇雄县| 西充县| 枞阳县| 扶余县| 乾安县| 道真| 安丘市| 伊宁市| 周至县| 洛阳市| 许昌市| 肇州县| 镇康县| 眉山市| 建水县| 绿春县| 甘泉县| 大田县| 石首市| 南汇区| 哈密市| 甘洛县| 临海市| 九龙城区| 忻州市| 西乌珠穆沁旗| 崇信县|