mysql免安裝版,服務無法啟動沒有抱任何錯誤
阿新 • • 發佈:2019-05-26
1.解壓
2.新建my.ini
[mysqld] # 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 # These are commonly set, remove the # and set as required. basedir = "D:\mysql-5.7.26-winx64\mysql-5.7.26-winx64" datadir = "D:\mysql-5.7.26-winx64\mysql-5.7.26-winx64\data" character-set-server = utf8 port = 3306 skip-grant-tables
3.在bin目錄下執行一下命令,會自動建立data資料夾
mysqld --initialize
4.在bin目錄下輸入下面命令,啟動服務
mysqld –install
5.啟動mysql服務
net start mysql
6.輸入命令進入mysql,更新密碼
update mysql.user set authentication_string=password('123456789') where user='root';
7.重新整理許可權
flush privileges
8.刪除my.ini中最後一句:skip-grant-tables
9.重啟mysql
net stop mysql
net start mysql