mysql非安裝包安裝教程

2021-09-26 08:08:40 字數 2807 閱讀 4507

我的電腦 ---> 高階系統配置 ---> 環境變數

用記事本開啟目錄下的my-default.ini檔案

注意:去掉前面的#號

my.ini內容為:(裡面路徑修改為自己安裝包所在路徑)

****************** my.ini內容開始 **********************

# for advice on how to change settings please see

# # *** 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.

[client]

default-character-set=utf8

[mysqld]

port=3306

#server_id = 2

#skip-locking

max_connections=100

table_open_cache=256

query_cache_size=1m

tmp_table_size=32m

thread_cache_size=8

innodb_flush_log_at_trx_commit =1

innodb_log_buffer_size=128m

innodb_buffer_pool_size=128m

innodb_log_file_size=10m

innodb_thread_concurrency=16

innodb-autoextend-increment=1000

join_buffer_size = 128m

sort_buffer_size = 32m

read_rnd_buffer_size = 32m

max_allowed_packet = 32m

explicit_defaults_for_timestamp=true

sql-mode="strict_trans_tables,no_auto_create_user,no_engine_substitution"

skip-grant-tables

#sql_mode=no_engine_substitution,strict_trans_tables

****************** my.ini內容結束 **********************

開啟命令列視窗,並用管理員許可權執行(必須使用管理員許可權執行),將目錄切換到你的解壓檔案bin目錄下

輸入:mysqld –install

service successfully installed

輸入:mysqld –initialize

輸入:net start mysql

mysql

服務正在啟動

mysql

服務已經啟動成功

這時我們就可以看到我們的

mysql

已經啟動

因為我們剛初始化過

mysql

,mysql

預設給我們乙個初始密碼,但是我沒有設定儲存到**,因此我們找不到這個密碼。我們剛才新建的

my.ini

這時就派上用場了,在檔案中,

skip-grant-tables

可以讓我們跳過驗證進入

mysql

(注意:有時需要重啟

mysql

配置才會生效)

在命令列視窗中

輸入:mysql –uroot –p

your mysql connection id is 2

server version: 5.7.13 mysql community server (gpl)

進入mysql

輸入:update mysql.user set authentication_string=password('123456') where user='root' and host = 'localhost';

(密碼

password

可自行修改)

這樣我們就可以用我們設定的密碼登入

mysql

mysql安裝包安裝 mysql安裝包安裝

centos7.4在無網環境下的mysql簡易安裝,使用tar包安裝mysql。使用的資源 上傳解壓 使用xftp上傳 解壓mysql 5.7.28 el7 x86 64.tar.gz 重新命名,方便配置環境變數 cd usr mv mysql 5.7.28 el7 x86 64 mysql 配置環...

mysql安裝(安裝包安裝)

2 使用命令列 cmd 進入mysql的bin目錄下,初始化資料庫,執行mysqld initialize console console 表示在控制台輸出,不新增則不展示下面那些資訊 最後一行root localhost 後的hd ed4j s 就是臨時密碼,登入時會使用 注意 1 data目錄要...

linux安裝MySQL 安裝包安裝

2.解壓 tar xvf mysql 8.0.20 linux glibc2.12 x86 64.tar.xz3.移動 usr local 下,並重命名 mv mysql 8.0.20 linux glibc2.12 x86 64 usr local mysql4.建立mysql使用者組和使用者,並...