Cf cups MySQL 등록

cf cups DB 등록

1 사전작업[ | ]

2 확인[ | ]

root@zetawiki:~# cf services
Getting services in org cloudpack / space testuser03 as testuser03...
OK

name    service      plan   bound apps             last operation
jmdb1   devpack-db   10gb   jm-spring-jdbc-movie   create succeeded

3 (Optional) DB 접속 확인[ | ]

root@zetawiki:~# mysql -h135.79.246.81 -udbuser1 -e'SHOW DATABASES;' 
Warning: Using a password on the command line interface can be insecure.
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mydb2016           |
| mysql              |
| performance_schema |
+--------------------+

4 서비스 등록[ | ]

root@zetawiki:~# cf cups mysql1 -p 'hostname,port,username,password,name,uri'

hostname> 135.79.246.80

port> 3306

username> root

password> nLV7biPXegYA8cdp

name> mydb2016

uri> mysql://root:nLV7biPXegYA8cdp@135.79.246.80:3306/mydb2016
Creating user provided service mysql1 in org cloudpack / space testuser03 as testuser03...
OK
→ 입력한 정보는 VCAP_SERVICES의 credentials 정보로 저장됨
(참고) spring-boot-starter-jdbcuri를 참조하여 DB에 접속함[1]
phpmyadmin-cfhostname, port를 참조하여 DB에 접속함

5 확인 2[ | ]

root@zetawiki:~# cf services
Getting services in org cloudpack / space testuser03 as testuser03...
OK

name    service         plan   bound apps             last operation
jmdb1   devpack-db      10gb   jm-spring-jdbc-movie   create succeeded
mysql1  user-provided

6 같이 보기[ | ]

7 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}