天翼云 RDS数据库操作

2023-04-20,,

1.RDS数据库创建好之后点击RDS实例管理找到已下信息

官方文档 -1:http://www.ctyun.cn/help/qslist/567

官方文档 -2:http://www.ctyun.cn/help/qslist/544

如图:

IP : 链接地址一列下方对应的是IP:POST(ip:端口),获取冒号左边的数据就是IP地址

HOST : 端口号(获取(IP:POST)冒号右边的数据就是端口号)

user : 天翼云默认RDS数据库用户名为root

password : 就是创建RDS实例时创建的密码

2.RDS数据库不对外展示,只有内网ip可以操作RDS数据库实例。打开一个安装过mysql数据库的天翼云命令窗口。

[root@ecs-7bec-0002 ~]# mysql -h<IP> -P<HOST> -u<user> -p<password>    //<红色> 是对应的值,命令不包括<>
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 95366
Server version: 5.6.30-log MySQL Community Server (GPL) Copyright (c) 2000, 2018, 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>

3.RDS数据库导出sql文件命令,直接在linux命令窗口输入

mysqldump --databases <数据库名称> --single-transaction --hex-blob --set-gtid-purged=
OFF --no-create-info --skip-triggers -u <数据库用户名> -p -h <数据库rds内网地址> -P <rds数据库端口> -r <生成的文件路径>

天翼云 RDS数据库操作的相关教程结束。

《天翼云 RDS数据库操作.doc》

下载本文的Word格式文档,以方便收藏与打印。