Linux 瀹夎Mysql
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux 瀹夎Mysql相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/use' title='use'>use
style 闀垮害 aliyun error download 璇彞 load host1銆佷笅杞?Mysql yum鍖?/span>
yum鍖呮枃浠跺湪mysql瀹樼綉閲屽彲浠ユ壘鍒?a href="https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fdev.mysql.com%2Fdownloads%2Frepo%2Fyum%2F" target="_blank" data-url="http://dev.mysql.com/downloads/repo/yum/">http://dev.mysql.com/downloads/repo/yum/
涓€鑸粯璁ゆ槸鏄剧ず鏈€鏂扮増mysql鐨刵oarch.rpm鏂囦欢
涓嬭浇鍒版湰鍦板啀涓婁紶鍒版湇鍔″櫒锛屾垨鑰呬娇鐢╳get 鐩存帴涓嬭浇
杩欓噷鎴戜滑涓嬭浇涓?.7鐗堢殑鏂囦欢
wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm
2銆佸畨杞瑈um杞欢婧?/span>
鎵ц濡備笅鍛戒护瀹夎
rpm -Uvh mysql57-community-release-el7-10.noarch.rpm
瀹夎yum杞欢婧?/span>
3銆佸畨瑁卪ysql鏈嶅姟绔?/span>
yum install -y mysql-community-server
瀹夎mysql鏈嶅姟绔紝杩欎竴姝ユ瘮杈冩极闀?/span>
4銆佸惎鍔╩ysql
service mysqld start
5銆佹鏌ysql 鐨勮繍琛岀姸鎬?/span>
service mysqld status
6銆佷慨鏀逛复鏃跺瘑鐮?/span>
Mysql5.7榛樿瀹夎涔嬪悗root鏄湁瀵嗙爜鐨勩€?/span>
7 銆佽幏鍙朚ySQL鐨勪复鏃跺瘑鐮?/span>
涓轰簡鍔犲己瀹夊叏鎬э紝MySQL5.7涓簉oot鐢ㄦ埛闅忔満鐢熸垚浜嗕竴涓瘑鐮侊紝鍦╡rror log涓紝error log鐨勪綅缃紝榛樿鏄?/var/log/mysqld.log銆?/span>
鍙湁鍚姩杩囦竴娆ysql鎵嶅彲浠ユ煡鐪嬩复鏃跺瘑鐮?/span>
grep 鈥榯emporary password鈥?/var/log/mysqld.log
锛堝鏋滀箣鍓嶅畨瑁呰繃MySQL鍒欒繖閲屽彲鑳戒細鏈夊涓瘑鐮侊紝鐢ㄦ渶鍚庝竴涓紝娉ㄦ剰杩欎釜瀵嗙爜杈撳叆鏃舵槸鍙互绮樿创鐨勶級 鏌ョ湅涓存椂
8銆?a href="https://blog.csdn.net/qq_39344689/article/details/89674079" target="_blank">淇敼mysql鐨勫瘑鐮?/a>
銆€棣栧厛闇€瑕佽缃瘑鐮佺殑楠岃瘉寮哄害绛夌骇锛岃缃?validate_password_policy 鐨勫叏灞€鍙傛暟涓?LOW 鍗冲彲锛?/span>
杈撳叆璁惧€艰鍙?鈥?set global validate_password_policy=LOW; 鈥?杩涜璁惧€硷紝
銆€銆€鐜板湪鍙互涓?mysql 璁剧疆绠€鍗曞瘑鐮佷簡锛屽彧瑕佹弧瓒冲叓浣嶇殑闀垮害鍗冲彲锛?/em>
杈撳叆淇敼璇彞 鈥?ALTER USER 鈥榬oot鈥楡鈥榣ocalhost鈥?IDENTIFIED BY 鈥?23456鈥? 鈥?鍙互鐪嬪埌淇敼鎴愬姛锛岃〃绀哄瘑鐮佺瓥鐣ヤ慨鏀规垚鍔熶簡锛侊紒锛?/em>
以上是关于Linux 瀹夎Mysql的主要内容,如果未能解决你的问题,请参考以下文章