PHP Sina Cloud Connection MySQL
<?php$con=mysql_connect (sae_mysql_host_m. ': '). Sae_mysql_port,sae_mysql_user,sae_mysql_pass); if (! $con) {die (' counld not connect: '. Mysql_error ());} mysql_select_db ("App_zezelyexam", $con);? >
Java Sina Cloud Connection MySQL
Use the main library write data to obtain the application's accesskey and secretkeystring Username=saeuserinfo.getaccesskey () using the static method provided by Saeuserinfo; String Password=saeuserinfo.getsecretkey ();
String url= "Jdbc:mysql://w.rdc.sae.sina.com.cn:3307/app_javazeze";
String user= "user name";
String pwd= "Password";
String driver= "Com.mysql.jdbc.Driver"; Class.forName (Driver). newinstance (); Connection con=drivermanager.getconnection (Url,username,password);
User name: accesskey (Applied accesskey) Password: secretkey (Applied secretkey) Main Library domain name: w.rdc.sae.sina.com.cn from library domain name: r.rdc.sae.sina.com.cn Port: 3307 Database name: app_appname (app_ plus app name)
Sina Cloud PHP and Java connection MySQL database