Sina Cloud PHP and Java connection MySQL database

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.