uj5u.com熱心網友回復:
my.ini 的內容全部貼上來。uj5u.com熱心網友回復:
貼上自己用的my.ini檔案,有時候叫my-default.ini,沒注意有啥區別,不過能用,僅供參考:
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** 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
#設定資料庫編碼
[mysql]
default-character-set=utf8
#設定命令編碼
[mysqld]
character-set-server=utf8
#取消遠程域名的驗證
skip-name-resolve
#取消驗證權限
#skip-grant-tables
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# 這兩個地址按照你自己的mysql地址配置
#庫的地址
basedir = C:\Java-Tools\mysql-5.6.23-winx64
#data目錄的地址
datadir = C:\Java-Tools\mysql-5.6.23-winx64\data
# port = .....
# server_id = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
#mysql5.0以上版本支持三種sql_mode模式:ANSI、TRADITIONAL和STRICT_TRANS_TABLES。
#ANSI模式:寬松模式,對插入資料進行校驗,如果不符合定義型別或長度,對資料型別調整或截斷保存,報warning警告。
#TRADITIONAL模式:嚴格模式,當向mysql資料庫插入資料時,進行資料的嚴格校驗,保證錯誤資料不能插入,報error錯誤。用于事物時,會進行事物的回滾。
#STRICT_TRANS_TABLES模式:嚴格模式,進行資料的嚴格校驗,錯誤資料不能插入,報error錯誤。
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#最大連接數
max_connections = 1000
uj5u.com熱心網友回復:
管理員命令提示符下操作REM 初始化,最后一個選項是解決某些版本會出現 [ERROR] InnoDB: File .\ib_logfile101: 'aio write' returned OS error 187. Cannot continue operation
mysqld --initialize-insecure --datadir=c:\mysql_data --console --innodb_flush_method=normal
REM 啟動,啟動后這個視窗會一直掛著(不要關閉,如果你不想這樣的方式,可以考慮用建服務)
mysqld --datadir=c:\mysql_data --console --innodb_flush_method=normal
REM 連接 -- 新開一個命令列視窗
mysql -u root
REM 停止
mysql -u root -e "shutdown"
uj5u.com熱心網友回復:
--datadir 指向的目錄,必須保證是空目錄,并且其父目錄至少是存在的建議的做法是建立一個組態檔,在里面寫上需要的配置項,然后用 --defaults-file=組態檔 來初始化或啟動
[mysqld]
datadir=c:\mysql_data
innodb_flush_method=normal
uj5u.com熱心網友回復:
需要去根目錄查看日志才知道問題原因轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/154998.html
標籤:疑難問題
下一篇:不該回原單位上班
