国产成人精品18p,天天干成人网,无码专区狠狠躁天天躁,美女脱精光隐私扒开免费观看

MySQL5.7.21如何安裝配置

發(fā)布時(shí)間:2021-08-08 19:37 來(lái)源:億速云 閱讀:0 作者:小新 欄目: Mysql 歡迎投稿:712375056

這篇文章主要介紹5.7.21如何安裝配置,文中介紹的非常詳細,具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

官方參考手冊

1.解壓MySQL 5.7.20安裝包,如X:\MySQL\mysql-5.7.21-winx64。(是沒(méi)有data和my.ini的)

 

2.配置mysql的環(huán)境變量,創(chuàng )建MYSQL_HOME,并且在Path添加上%MYSQL_HOME%\bin;

  

3,配置my.ini. 并把my.ini放到bin目錄下(1.如果放在mysql-5.7.21-winx64 目錄下,在下面執行net start mysql時(shí)可能無(wú)法啟動(dòng)MYSQL服務(wù)、2.不會(huì )自動(dòng)生成data)

[client]
 
default-character-set=utf8
 [mysqld]
#解壓目錄 如:D:\MySQL\mysql-5.7.21-winx64
 basedir = %MYSQL_HOME% 
#解壓目錄 如:D:\MySQL\mysql-5.7.21-winx64\data
 datadir = %MYSQL_HOME%\data 
 port = 3306 
 default-character-set=utf8

4. 以管理員身份進(jìn)入命令行(可在小娜搜索輸入cmd找到),并進(jìn)入X:\MySQL\mysql-5.7.21-winx64\bin目錄下輸入命令:mysqld --initialize-insecure (生成無(wú)密碼的root用戶(hù)) 后,在mysql-5.7.20-winx64 目錄下就會(huì )出現data文件

5.再輸入mysqld --install,如果出現Service successfully installed 說(shuō)明注冊成功了。

注意:如果此操作報錯Install/Remove of the Service Denied!,建議使用管理員身份進(jìn)入命令提示符


6.啟動(dòng)MySQL服務(wù),命令:net start mysql

7.設置密碼   mysqladmin -u root password 密碼

8.修改密碼方法如下 :接著(zhù)輸入mysql -uroot -p    由于之前登陸過(guò),直接輸入剛才設置密碼(登錄root第一次是免密碼的直接回車(chē)進(jìn)入到) MYSQL>

接著(zhù)輸入:update mysql.user set authentication_string=password('你想輸入的密碼') where user='root' and Host ='localhost';    然后接著(zhù)再輸入: flush privileges;


9.輸入命令show databases;  查看數據

MySQL常用的命令如下

List of all MySQL commands: 
Note that all text commands must be first on line and end with ';'(要以“;”結尾) 
?  (\?) Synonym for `help'. 
clear (\c) Clear the current input statement. 
connect (\r) Reconnect to the server. Optional arguments are db and host. 
delimiter (\d) Set statement delimiter. 
ego (\G) Send command to mysql server, display result vertically. 
exit (\q) Exit mysql. Same as quit. 
go (\g) Send command to mysql server. 
help (\h) Display this help. 
notee (\t) Don't write into outfile. 
print (\p) Print current command. 
prompt (\R) Change your mysql prompt. 


quit (\q) Quit mysql.

rehash (\#) Rebuild completion hash. 
source (\.) Execute an SQL script file. Takes a file name as an argument. 
status (\s) Get status information from the server. 
tee (\T) Set outfile [to_outfile]. Append everything into given outfile. 
use (\u) Use another database. Takes database name as argument. 
charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. 
warnings (\W) Show warnings after every statement. 
nowarning (\w) Don't show warnings after every statement. 
resetconnection(\x) Clean session context.

10.輸入 \q; 退出MySQL

11.關(guān)閉MySQL服務(wù),命令:net stop mysql

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。

老师粉嫩小泬喷水视频90| 欧美丰满少妇XXXXX| 可以直接看的无码AV| 国产精品久久婷婷六月丁香| 久久精品国产亚洲av麻豆小说| 蜜桃一区二区三区|