官方有篇博客講解客戶端怎麼鏈接cloudfoundry的mysql服務。http://cnblog.cloudfoundry.com/2012/07/07/200/
按照上面的教程實踐,你可能會遇到以下的exception:
1.當執行vmc tunnel 的時候,可能提示: mysql
Please install 'tunnel-vmc-plugin' to enable tunnelling解決:sudo gem install tunnel-vmc-plugin
terminate called after throwing an instance of 'std::runtime_error' what(): Encryption not available on this event-machine Aborted (core dumped) ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0解決:sudo gem install eventmachine -- --with-openssl-dir=/usr/lib/ssl
說明:執行上面一條命令時候我按照網上的解決執行了sudo apt-get install libssl-dev,可是安裝完依賴後依然出現上面的問題,最後又找到一種解答因而執行了以下命令:sudo gem install eventmachine -- --with-openssl-dir=/usr/lib/ssl 才解決了問題。可是我不知道sudo apt-get install libssl-dev對解決這個問題是否起幫助做用。總結:
a.sudo gem install tunnel-vmc-plugin
b.sudo gem install eventmachine -- --with-openssl-dir=/usr/lib/ssl
c.gem install caldecott
環境:ubuntu、vmc0.4.7 sql