最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

阿里云配置MySQL-server?8.0遠(yuǎn)程登錄的實(shí)現(xiàn)

 更新時(shí)間:2023年08月25日 10:22:34   作者:runscript.sh  
我們經(jīng)常會(huì)碰到需要遠(yuǎn)程訪問(wèn)數(shù)據(jù)庫(kù)的場(chǎng)景,本文主要介紹了阿里云配置MySQL-server?8.0遠(yuǎn)程登錄的實(shí)現(xiàn),具有一定的參考價(jià)值,感興趣的可以了解一下

Ubuntu 22.04 LTS 安裝MySQL-Server 8.0

# apt search mysql-server
# apt install mysql-server

重建服務(wù)

# service mysql stop
# vi  /etc/mysql/mysql.conf.d/mysqld.cnf
...
bind-address = 0.0.0.0
...
# service mysql start
# lsof -i:3306
COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
mysqld  18386 mysql   23u  IPv4 239692      0t0  TCP *:mysql (LISTEN)

開(kāi)發(fā)端口

# iptables -A INPUT -j ACCEPT

在阿里云上開(kāi)發(fā)端口映射,并標(biāo)注允許登錄的主機(jī)IP(此處擦去);

授權(quán)用戶登錄:

# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.34-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
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> create database book;
Query OK, 1 row affected (0.01 sec)
mysql> CREATE USER 'book'@'%' IDENTIFIED BY 'abcd1234';
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT select,update,insert,delete ON book.* TO 'book'@'%' ;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges  on book.* to book@'%';
Query OK, 0 rows affected (0.00 sec)

這里密碼僅做演示,可以設(shè)置復(fù)雜的密碼。

另外一臺(tái)開(kāi)放IP的主機(jī),安裝MySQL客戶端

# apt search mysql-client
# apt install mysql-client-8.0

遠(yuǎn)程登錄MySQL服務(wù)器

#  mysql -h 172.16.0.1 -u book -P3306 -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 8.0.34-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
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> show databases;
+--------------------+
| Database           |
+--------------------+
| book               |
| information_schema |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
mysql>

到此這篇關(guān)于阿里云配置MySQL-server 8.0遠(yuǎn)程登錄的實(shí)現(xiàn)的文章就介紹到這了,更多相關(guān)阿里云配置MySQL遠(yuǎn)程登錄內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • sql四大排名函數(shù)之ROW_NUMBER、RANK、DENSE_RANK、NTILE使用介紹

    sql四大排名函數(shù)之ROW_NUMBER、RANK、DENSE_RANK、NTILE使用介紹

    這篇文章主要介紹了sql四大排名函數(shù)之ROW_NUMBER、RANK、DENSE_RANK、NTILE使用,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-08-08
  • 最新評(píng)論

    通许县| 祁连县| 河北省| 西安市| 博客| 芜湖县| 筠连县| 淮阳县| 博乐市| 东阳市| 丽江市| 济南市| 乌鲁木齐县| 库车县| 霍城县| 乡城县| 密云县| 锡林郭勒盟| 措美县| 灵石县| 双柏县| 成安县| 镇巴县| 旬阳县| 克东县| 宜都市| 蒲城县| 和静县| 华容县| 彰武县| 姜堰市| 册亨县| 鄂伦春自治旗| 大同县| 若羌县| 古交市| 寻乌县| 高阳县| 贡山| 郸城县| 璧山县|