阿里云服务器如何连接阿里云数据库

环境:阿里云ubuntu服务器 阿里云RDS数据库

问题:如何在阿里云服务器的终端使用shell命令连接RDS云数据库

解决方法:

1.阿里云服务器安装MySQL

sudo apt-get install mysql-server

如果出现unable to  locate package mysql-server

先使用语句 sudo apt-get update


2.连接阿里云数据库

在阿里云服务器终端

mysql -u root  -h RDS数据库连接地址 -p

按提示输入密码

猜你喜欢

转载自blog.csdn.net/xxzhix/article/details/78265029