Read this blog before you must look at another blog, Link is http://www.cnblogs.com/-beyond/p/6686166.html
After reading, by default you know how to upload code to the Sina cloud SAE, and can run successfully, before you connect the database, you must first create an application.
Now I'm creating an app called Sampleone, like
Click on the code management on the left, select Create a version on the right
Then you'll see the following page
You can choose to edit the code, you can also choose to upload the code package, but here, for the sake of simplicity, I only create a code file, directly inside the index.php
You've noticed that there are a few parameters to the database, so what do you think?
Select the shared MySQL and create the version
You may find that the name of the database has been determined, beginning with the app, plus your app name, which is different from the database name you have on this computer, so before you upload your database, please change the database name to app plus the appropriate app name.
Click on the management, do not direct point data import, if you will docker technology, you can try
Click Import, then select File Import
After successful import, return to the following interface, select details
You'll see
The area circled in the picture is the parameters of the database connection, $host value is the main library address (or from the library address), $db = "App_sampleone";
Modify the database connection parameters in your code to connect
Test results, perfect operation!
Teach you how to deploy your own website on Sina cloud--Connect database