欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

mysql如何實現(xiàn)用戶創(chuàng)建

這篇文章主要介紹MySQL如何實現(xiàn)用戶創(chuàng)建,文中介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們一定要看完!

創(chuàng)新互聯(lián)建站主營新市網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,重慶App定制開發(fā),新市h5成都小程序開發(fā)搭建,新市網(wǎng)站營銷推廣歡迎新市等地區(qū)企業(yè)咨詢

mysql> create database test;

Query OK, 1 row affected (0.00 sec)

mysql> 

mysql> create user 'chenyj'@'*' identified by 'chenyj';

Query OK, 0 rows affected (0.01 sec)

mysql> 

mysql> grant all on test.* to chenyj@'*';

Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.01 sec)

mysql> 

mysql> grant all on test.* to 'chenyj'@'*';

Query OK, 0 rows affected (0.01 sec)

mysql> grant connect to 'chenyj'@'*';

ERROR 3523 (HY000): Unknown authorization ID `connect`@`%`

mysql> 

mysql> create user 'chenyj'@'%' identified by 'chenyj';

Query OK, 0 rows affected (0.01 sec)

mysql> 

mysql> grant all on test.* to 'chenyj'@'%';

Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

測試:

[root@mysql8-01 ~]# mysql -h localhost -u chenyj -p

Enter password: 

ERROR 1045 (28000): Access denied for user 'chenyj'@'localhost' (using password: YES)

[root@mysql8-01 ~]# 

[root@mysql8-01 ~]# mysql -h localhost -u chenyj -p

Enter password: 

ERROR 1045 (28000): Access denied for user 'chenyj'@'localhost' (using password: YES)

[root@mysql8-01 ~]# mysql -h localhost -u chenyj -p

Enter password: 

ERROR 1045 (28000): Access denied for user 'chenyj'@'localhost' (using password: YES)

[root@mysql8-01 ~]# 

[root@mysql8-01 ~]# mysql -h localhost -u chenyj -p

Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 13

Server version: 8.0.14 MySQL Community Server - GPL

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

mysql> 

需要注意的是通配符應(yīng)該采用'%'

以上是“mysql如何實現(xiàn)用戶創(chuàng)建”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

網(wǎng)站題目:mysql如何實現(xiàn)用戶創(chuàng)建
當(dāng)前鏈接:http://www.chinadenli.net/article14/gooede.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作標(biāo)簽優(yōu)化網(wǎng)站排名網(wǎng)站改版定制網(wǎng)站網(wǎng)站內(nèi)鏈

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)