Azure-MySQLServer
created OK
安装mysql client
apt install mysql-client
root@vm001:~# mysql --version
mysql Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using EditLine wrapper
root@vm001:~#
root@vm001:~# curl ifconfig.io
20.21.20.21
root@vm001:~#
把客户端的public ip添加到mysql
否则会有这个提示:
root@vm001:~# mysql -u azureuser@xmandb --host xmandb.mysql.database.azure.com -p
Enter password:
ERROR 9000 (HY000): Client with IP address '20.21.20.21' is not allowed to connect to this MySQL server.
root@vm001:~#
test connection
mysql -u azureuser@xmandb --host xmandb.mysql.database.azure.com -p