Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Using MySql database on heroku?
Hey,
I don`t really want to buy host plan for now because my site is kind of bad :D
But I have to show it at school, and I don`t want to get in trouble for not having it hosted online .. This is final exam in my school, so it`s suppoused to be serious work ..
I was building it using xampp and phpmyadmin for database..
I deployed all of the site onto heroku. But I`m quit clueless about databases..
The site itself works.
I added ClearDB MySql addon for the site, but where do I store the database itself and how do I make connection to it ? Will MySqli statements work also on the heroku or will I have to change the code to get it working on the heroku?
Sorry for my bad english :D And my lack of knowladge in programming.. Qiut a crappy school if you ask me .. We had only basic Access and basic html when studying (it`s vocational school .. for 4 years).. And stuff about databases is onlything i`ve read on the internet .. So please enlighten me if i`m dead wrong in using mysql and heroku..
2 Answers
- ChrisLv 76 years ago
I don't know how Heroku handles this, but the basic idea is:
1. export your database using phpMyAdmin
2. import it on Heroku
3. change your PHP code so it uses the proper database credentials.
What I do is use a separate file called creds.php which contains the server, db, user and login.
I include this in my functions.php, and when uploading a site to the server, I use a modified creds.php that contains the correct server credentials.
If the addon is called ClearDB MySql, then yes, mysqli statements should work.