mysql 5.7.18 安裝及問題匯總,今天新部署了一臺(tái)mysql,遇到了幾個(gè)小問題,記錄一下。
第一步:https://dev.mysql.com/downloads/mysql/ 下載欲安裝的版本,我下的是windows x64版本
第二步:解壓到安裝目錄./Path/
第三步:添加環(huán)境變量,將./Path/bin/添加到環(huán)境變量Path的結(jié)尾處,以”;”結(jié)束
第四步:配置my.ini,主要是設(shè)置端口,數(shù)據(jù)庫路徑,日志,buffer等配置信息
第五步:打開命令行窗口,執(zhí)行初始化命令
mysqld –initialize-insecure –user=mysql;
mysqld install;
net start mysql;
mysql;
update user set authentication_string=password(“password”) where user='root';
grant usage on *.* to ‘username'@'%' identified by ‘password' with grant option;
create database test_db;
grant all privileges on test_db.* to ‘username'@'%' identifiedby ‘password';
flush privileges;
第六步:開啟防火墻端口,添加端口對應(yīng)的入站規(guī)則
問題匯總:
1. 問題:執(zhí)行mysqld命令時(shí),提示缺少msvcr120.dll,msvcp120.dll,
解決辦法:
請下載32位版本的msvcr120.dll,msvcp120.dll,ucrtbase.dll三個(gè)版本的dll文件至mysql的bin目錄下。(汗一個(gè)…)
2. 問題:執(zhí)行mysqld –initialize-insecure –user=mysql命令的時(shí)候出錯(cuò),
解決辦法:兩個(gè)原因:
1).沒有創(chuàng)建對應(yīng)配置信息的日志目錄
2).數(shù)據(jù)存放目錄不為空
3. 問題:修改mysql的root密碼時(shí)使用update user set psssword=password(“password”) where user='root';指令報(bào)錯(cuò):ERROR 1054 (42S22): Unknown column ‘password' in ‘field list'
解決辦法:
password已修改為“authentication_string”
4. 問題:添加用戶時(shí)使用”insert into mysql.user(host,user,authentication_string) values(“%”,”username”,password(“password”));”指令報(bào)錯(cuò):ERROR 1364 (HY000): Field ‘ssl_cipher' doesn't have a default value
解決辦法:
這在5.7中已不適用,正確的用法是使用grant usage指令
以上所述是小編給大家介紹的mysql 5.7.18 安裝教程及問題匯總,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
您可能感興趣的文章:- centos7.2離線安裝mysql5.7.18.tar.gz
- mysql 5.7.18 綠色版下載安裝教程
- mysql 5.7.18 Installer安裝下載圖文教程
- mysql 5.7.18 MSI安裝圖文教程
- mysql 5.7.18 Archive壓縮版安裝教程
- mysql 5.7.18 winx64安裝配置方法圖文教程
- MySQL 5.7.18 免安裝版配置教程
- Centos7.3下mysql5.7.18安裝并修改初始密碼的方法
- MySQL5.7.18下載和安裝過程圖文詳解
- mysql 5.7.18 zip版安裝使用教程