使用vmc tunnel连接到cloudfoundry的mysql service并执行备份等任务

rux posted @ 12 years ago in cloudfoundry with tags mysql cloudfoundry , 3201 readers

cloudfoundry的mysql service非常方便部署,但是如何进行备份呢,如果数据量太大我想分开表来备份呢?如果我想做其他一些数据库的操作呢?

使用vmc tunnel可以很方便的连接到你的mysql service上并把它映射为本地的一个mysql服务,这样你就能通过本机的mysql及mysqldump等工具来对数据库进行操作了。

首先运行vmc services 获得你的mysql name

1
2
3
4
5
C:\Users\Rux>vmc services
Getting services... OK
 
name         service   version
mysql-xxxx   mysql     5.1

此处的mysql-xxxx就是你的mysql name,具体的返回条数由每个人绑定的mysql service数量决定,假设这个mysql-xxxx就是我们想要进行操作的数据库。

1
2
3
4
5
C:\Users\Rux>vmc tunnel mysql-xxxx
1: none
2: mysql
3: mysqldump
Which client would you like to start?>

一般操作选择2或者3(只能全表备份)都可以,不过这里我们选择1: none

1
2
3
4
5
6
7
8
9
10
11
Opening tunnel on port 10000... OK
 
Service connection info:
  username : nnnnnnnnnnnnn
  password : sssssssssssss
  name     : nananananananananananananananana
 
 
Open another shell to run command-line clients or
use a UI tool to connect using the displayed information.
Press Ctrl-C to exit...

以上的返回信息里,username和password自然是数据库的用户名和密码啦,name则是数据库名称(db name)。

ok,有了这些信息我们就可以使用mysql或mysqldump来连接mysql-xxxx实例了,譬如你想把里面两张表users和groups备份出来为db.sql,只需要另开一个命令行窗口,执行以下的mysqldump就可以了。

1
mysqldump -h 127.0.0.1 -P 10000 -u nnnnnnnnnnnnn  -psssssssssssss  nananananananananananananananana users groups > db.sql

除了备份,其余的mysql操作也同样可以通过这样的连接来进行。

以上操作使用vmc版本号为0.5.0

参考内容:

SHAFIQ said:
7 years ago

Oh so sad, May her soul rest in peace. I got to know about her death from www.aubestsessays.com.She was a really very talented artist. Thank you for sharing this.

 

Domestic Violence in said:
7 years ago

This orange theory is very interesting and its impact on health is also noteworthy. I want to get into its details but let me first give last training session on site to my students. Thanks for this post.

Discount wedding dre said:
6 years ago

i can understand the indescribable feeling when one completes their art. you must be in that ethereal state. keep us posted with more from you

best dentist said:
6 years ago

lavender has always been my favourite and seeing the fields painted so well really captures my heart. i could understand when you said you could stay there forever

Nile River Landscape said:
6 years ago

Man you are just fantabulous. I have been to many websites of diffferent artisits but you are the only one has put the video on it. Love the short video of your little opening. Love your work. may you flourish and succeed in future.

logo design said:
6 years ago

best art that we ever have seen

furniture stores boi said:
6 years ago

This is really valuable information about browsers compatibility.Your writing skills are great.If you offer online then it can be great.Thanks.

Miles Finer Blue Jac said:
6 years ago

Support can be gotten from the authority manual.[23] Free help moreover is accessible in various IRC channels and discussions. Prophet offers paid help by means of its MySQL Enterprise items. They contrast in the extent of administrations and in cost. Moreover, various outsider associations exist to offer help and administrations, including MariaDB and Percona.

Cabo Trek said:
6 years ago

This is outstanding site.I liked this product but if you think to reduce some cost then I can think to buy.I am actually currently busy in online but as I get free I will be back to your post.

OUTLET ILLUMINAZIONE said:
6 years ago

I was exactly looking for this post.I am happy to get this one.My sister is excited to get such outstanding content and just free of cost.Thanks.

pattisfood said:
6 years ago

Are you searching for good catering support? Then nothing can be more worth it than Catering Mississauga. Ready to explore the generosity with the professionals, comment below and avail a great chance for the lifetime.

 

Acoustic Guitar Unde said:
6 years ago

If you want to produce that deep, rich and versatile acoustic guitar sound, you’re going to need a quality instrument to show off your skills and help build new ones. Whether jamming with a group or accompanying a single vocalist, guitar players know that their strumming is the heart and soul of any melody.

best latex mattress said:
6 years ago

There are two kinds of latex - common and engineered. In view of the solace factor, common latex is exceptionally suggested for sleeping pad purchasers. This is on the grounds that characteristic latex is delivered from an elastic tree, which gives regular help. Numerous clients select normal latex on account of its advantages. best latex mattress

thomis said:
6 years ago

<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--> <a href="https://www.youtube.com/">click here</a>

thomis said:
6 years ago

[url=https://www.youtube.com/]click here[/url]

Catering Mississauga said:
6 years ago

<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--> I was looking for some catering services for my engagement. I just got to experience Catering Mississauga and trust me they are amazing. It was a wonderful experience.

sadaf said:
6 years ago

Yes Dirtmusic:'Troubles' actually worked as thunderstrom and one of my friend even repeatedly<a href="AI">http://www.alrouahcompany.com/</a> listened the music.He just went crazy after this.Indeed its awesome post.Thanks for sharing.

saania said:
6 years ago

looking Very Good http://www.alrouahcompany.com/ and awesome

saania said:
6 years ago

looking<a href="http://www.alrouahcompany.com/">AI</a>Awesome

<a href="http://www. said:
6 years ago

Verry Very Good

AI said:
6 years ago

good looking

dramin said:
5 years ago

I do digital marketing for many companies and often do coding as well for hair transplant clinic in lahore and found it good one.

 

dang nhap w88 said:
4 years ago

It is ideal time to make a few arrangements for the future and the time has come to be glad

w88ok said:
4 years ago

Well I really enjoyed reading it. This article provided by you is very practical for good planning.

oem unlock said:
4 years ago

Improved touch innovation planned into the framework considers a general incredible interface experience.

dang ky w88 said:
4 years ago

I like what you guys tend to be up too. This kind of clever work and reporting! Keep up the amazing works guys I’ve incorporated you guys to my blogroll.

Κατασκευή eshop said:
3 years ago

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more posts like these. Thank you very much.

Website said:
3 years ago

School Trips in Nairobi
It's a great pleasure reading your post. It's full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work.

Website said:
3 years ago

https://programminginsider.com/using-paper-help-is-a-fast-solution-to-writing-problems/
This is really nice and informative. containing all information and also has a great impact on the new technology. Thanks for sharing it.

streaming eventi said:
3 years ago

Thank you very much for sharing these links. Will definitely check this out.

Website said:
3 years ago

hmas hobart warship model
Nice to read your article! I am looking forward to sharing your adventures and experiences.

Website said:
3 years ago

xbox one tv remote codes
What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more posts like these. Thank you very much.

Davie locksmith said:
3 years ago

I read that Post and got it fine and informative. Please share more like that.

Carbon emissions said:
3 years ago

Thank you for taking the time to publish this information very useful.

Website said:
3 years ago

Toshiba remote codes
These are some great tools that I definitely use for SEO work. This is a great list to use in the future.

Website said:
3 years ago

Sale and purchase property lawyer
Thanks for sharing the info. Keep up the good work going. I really enjoyed exploring your site. Good resource.

Microneedling said:
3 years ago

Nice to be visiting your blog again. It has been months for me. Well, this article that I've been waiting for so long. I need this article to complete my assignment in college and it has the same topic as your article. Thanks. Great share.

Website said:
3 years ago

is prostate 911 legitimate
This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!

Website said:
3 years ago

is hawkeye hemp cbd gummies scam
Your blog provided us with valuable information to work with. Each &every tip of your post is awesome. Thanks a lot for sharing. Keep blogging.

Website said:
3 years ago

does keoni cbd gummies work
This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.

Website said:
3 years ago

live well cbd gummies ingredients
It's a great pleasure reading your post. It's full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work.

Website said:
3 years ago

where to buy trichofol
I am very happy to discover your post as it will become on top of my collection of favorite blogs to visit.

amb slot กติกาบิงโก said:
3 years ago

The website is looking a bit flashy and it catches the visitor's eyes. The design is pretty simple and a good user-friendly interface.

Website said:
3 years ago

hemp bombs cbd gummies reviews
Superbly written article. If only all bloggers offered the same content as you. the internet would be a far better place.

비크릿검증 said:
3 years ago

This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it.

seo service UK said:
about 1 year ago

Glad to chat your blog, I seem to be forward to more reliable articles and I think we all wish to thank so many good articles, blog to share with us.

티비몬 said:
about 1 year ago

It is my first visit to your blog, and I am very impressed with the articles that you serve. Give adequate knowledge for me. Thank you for sharing useful material. I will be back for the more great post.

온라인카지노 said:
about 1 year ago

비슷한 주제에 대한 흥미로운 정보를 읽을 수있는 페이지로 여러분을 초대합니다.

뉴토 끼 said:
about 1 year ago

"초기 당신은 멋진 블로그를 얻었습니다. 나는 결심에 더하기 균일 한 분을 포함합니다. 나는 당신이 정말로 매우 기능적인 문제를 가지고 있다고 생각합니다. 나는 항상 당신의 블로그 축복을 확인하고 있습니다.

Brook Taube said:
about 1 year ago

As Brook's reputation grew, so too did his influence within the financial community. Recognized for his visionary leadership and innovative thinking, Brook was entrusted with increasingly complex and challenging roles,

Freetubespot said:
about 1 year ago

ounded by a team of visionaries with a shared goal of democratizing access to premium content, Freetubespot quickly rose to prominence as a leader in the online streaming industry.

Freetubespot said:
about 1 year ago

n conclusion, the story of is one of resilience, determination, and unwavering commitment to excellence. From his humble beginnings to his meteoric rise to success, Brook's journey serves as a powerful reminder of the transformative power of ambition, hard work, and a relentless pursuit of one's dreams

Freetubespot said:
about 1 year ago

Moreover, Freetubespot regularly updates its content library to keep pace with the latest trends and releases, ensuring that users are always treated to fresh and engaging material.

Freetubespot said:
about 1 year ago

Moreover, Freetubespot regularly updates its content library to keep pace with the latest trends and releases, ensuring that users are always treated to fresh and engaging material.

Freetubespot said:
about 1 year ago

<a href="https://weekmagzine.com/freetubespot-detail/">Freetubespot</a> is not just a streaming platform; it's an immersive universe where viewers can escape into the world of entertainment with just a few clicks.

Freetubespot said:
about 1 year ago

At its core, Freetubespot is not just a streaming platform; it's an immersive universe where viewers can escape into the world of entertainment with just a few clicks.

seo service london said:
about 1 year ago

I think this is one of the most significant information for me. And i’m glad reading your article

joker gaming said:
about 1 year ago

Joker Gaming is more than just a gaming platform; it's a gateway to a world of excitement, adventure, and endless entertainment.

MyWorkLife said:
about 1 year ago

we'll explore the many features and benefits of MyWorkLife and how it can help you unlock your full potential.

saqib07 said:
about 1 year ago

As a testament to its impact, VentsFanzine has played a pivotal role in shaping the way fans engage with and contribute to their respective fandoms. By providing a platform for authentic and diverse voices, VentsFanzine has become a catalyst for positive change within the fandom culture, fostering a sense of belonging and empowerment among fans.<a href="https://ventsfanzine.com/2024/02/15/decoding-02045996870-why-its-popular-inside-the-uk/">02045996870</a>

02045996870 said:
about 1 year ago

As a testament to its impact, VentsFanzine has played a pivotal role in shaping the way fans engage with and contribute to their respective fandoms. By providing a platform for authentic and diverse voices, VentsFanzine has become a catalyst for positive change within the fandom culture, fostering a sense of belonging and empowerment among fans.

https://ventsfanzine said:
about 1 year ago

Venturing into Digital Success with VentsFanzine: Unveiling the Power of Creative SEO.

https://thenewsfresh said:
about 1 year ago

Unlock the secret to a luv-trise healthier life and embrace boundless happiness through the power of love. In this fast-paced world, where stress lurks around every corner, prioritizing your well-being becomes paramount. Imagine a life filled with radiant health, where each day is a celebration of vitality and joy.

슬롯나라 said:
5 months ago

This surely helps me in my work. Lol, thanks for your comment! wink Glad you found it helpful.


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter