win10涓嬪畨瑁卪ysql5.7

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了win10涓嬪畨瑁卪ysql5.7相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/%e7%bc%96%e8%be%91' title='缂栬緫'>缂栬緫   format   plugin   鐧婚檰   nsis   note   ann   fir   pool   

 

1.涓嬭浇mysql5.7
鎴戣繖閲屼笅杞界殑鏄痬ysql-5.7.32-winx64

2.瑙e帇鏂囦欢澶?/span>
鍛藉悕涓?
D:softmysql57_host01

3.鍒涘缓鐩稿簲鐨勭洰褰?/span>
D:softmysql57_host01conf
D:softmysql57_host01data
D:softmysql57_host01 edolog
D:softmysql57_host01mysqlloginlog
D:softmysql57_host01mysqlloglogfile
D:softmysql57_host01mysqllog elaylog

4.灏唌ysql bin鐩綍娣诲姞鍒扮幆澧冨彉閲?/span>

5.鍒濆鍖?/span>
C:UsersAdministrator>mysqld --initialize --console --user=mysql --basedir=D:softmysql57_host01 --datadir=D:softmysql57_host01data --lc_messages_dir=D:softmysql57_host01share --lc_messages=en_US
2020-11-08T12:00:03.328306Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-11-08T12:00:03.501582Z 0 [Warning] InnoDB: New log files created, LSN=45790
2020-11-08T12:00:03.526135Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2020-11-08T12:00:03.622361Z 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: ef87536e-21b9-11eb-978b-0a0027000002.
2020-11-08T12:00:03.625501Z 0 [Warning] Gtid table is not ready to be used. Table 鈥榤ysql.gtid_executed鈥?cannot be opened.
2020-11-08T12:00:05.325778Z 0 [Warning] CA certificate ca.pem is self signed.
2020-11-08T12:00:05.975542Z 1 [Note] A temporary password is generated for root@localhost: Q/x_8Riq<KUW

6.缂栬緫閰嶇疆鏂囦欢

鏂囦欢鍚?D:softmysql57_host01confmy.ini
鍐呭濡備笅:

[mysqld]
port=3306
server-id=1
basedir=D:\softmysql57_host01
datadir=D:\softmysql57_host01\data
max_connections = 1500
character_set_server=utf8mb4
skip-external-locking
key_buffer_size=64M
max_allowed_packet=32M
myisam_sort_buffer_size=64M
query_cache_size=32M
read_buffer_size=2M
sort_buffer_size=2M
#table_cache=512
#thread_cache=20
#thread_concurrency=4
interactive_timeout=86400
wait_timeout=86400
innodb_file_per_table=1
#innodb_additional_mem_pool_size=16M
innodb_buffer_pool_size=128M
innodb_flush_log_at_trx_commit=2
innodb_lock_wait_timeout=50
innodb_log_buffer_size=128M
innodb_log_file_size=128M
innodb_log_files_in_group=5
innodb_log_group_home_dir=D:\soft\mysql57_host01\redolog
innodb_thread_concurrency=8
log_bin_trust_function_creators=1
event_scheduler=1
max_binlog_size=100M
log-bin=D:\soft\mysql57_host01\mysqllog\binlog\binlog.bin
slow_query_log=on
slow_query_log_file=D:\soft\mysql57_host01\mysqllog\logfile\low-query.log
long_query_time=1
log-error=D:\soft\mysql57_host01\mysqllog\logfile\mysql-err.log
binlog_format=row
##expire_logs_days=7
binlog_cache_size=4MB
skip-host-cache
#skip-name-resolve
#read-only
skip-slave-start
relay-log-index=D:\soft\mysql57_host01\mysqllog\relaylog\slave-relay-bin.index
relay-log=D:\soft\mysql57_host01\mysqllog\relaylog\relaylog-binlog
replicate-ignore-db=information_schema,performance_schema
slave_net_timeout=60
log_slave_updates=1
language=D:\soft\mysql57_host01\share\english
early-plugin-load=""
explicit_defaults_for_timestamp=true
gtid_mode=ON
enforce_gtid_consistency = ON
collation-server=utf8mb4_general_ci
init_connect=鈥?/span>SET collation_connection = utf8mb4_general_ci鈥?/span>
init_connect=鈥?/span>SET NAMES utf8mb4鈥?/span>
lower_case_table_names=1
sql_mode=鈥?/span>STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION鈥?/span>

[client]
port = 3306
socket=D:\softmysql57_host01\mysql.sock
default-character-set = utf8

[mysqldump]
quick
max_allowed_packet = 32M
[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M
read_buffer = 4M
write_buffer = 4M

 

 

7.瀹夎mysql鏈嶅姟骞跺惎鍔?/span>
C:UsersAdministrator>mysqld.exe install MySQL --defaults-file="D:softmysql57_host01confmy.ini"
Service successfully installed.


C:UsersAdministrator>net start mysql
MySQL 鏈嶅姟姝e湪鍚姩 .
MySQL 鏈嶅姟宸茬粡鍚姩鎴愬姛銆?/span>

8.鐧诲綍淇敼root瀵嗙爜
C:UsersAdministrator>mysql -h localhost -uroot -p
Enter password: ************

鎴栬€?/span>
update mysql.user set authentication_string=password(鈥榤ysql鈥? where user=鈥榬oot鈥?and host = 鈥榣ocalhost鈥?
flush privileges;

9.鍒涘缓寮€鍙戠敤鎴?/span>
鍒涘缓鐧婚檰鐢ㄦ埛
grant ALL on *.* to root@鈥?鈥?identified by 鈥榤ysql鈥?WITH GRANT OPTION;

 






























以上是关于win10涓嬪畨瑁卪ysql5.7的主要内容,如果未能解决你的问题,请参考以下文章

Windows10涓嬪畨瑁匳Mware workstation 15.1铏氭嫙鏈?閰嶇疆Ubuntu16绯荤粺

linux涓嬪畨瑁卹edis

kail涓嬪畨瑁匯saCtfTool

Linux涓嬪畨瑁匱omcat

Linux涓嬪畨瑁卬ode鍙妌pm

Windows7涓嬪畨瑁単olang璇█寮€鍙戠幆澧冨拰revel妗嗘灦