Is it possible to create and use a MySQL database outside of my website host and link it to my website.
For example, using freehostia.com, my website is being hosted with one MySQL database to handle the WordPress Application installed. I want another database to use for SourceBans, and have it accessed at MyWebsiteName.com/bans, but freehostia.com only allows free users to have one database.
Is it possible to create another database somewhere else and use it on my website?
Yes, You can.
You can separate out your application server and the database server. But there are configurations that need to be done in order for such architecture to work. This is mostly done due to security and scalability.
Please kindly elaborate your requirement so that I can help you.
Other users already that yes you can, I want to show a simple approach on you gonna do it.
Simple when you are connecting to an external Database , you can use the mysql’s server IP as your host when trying to connect using PHP.
For example in PHP:
If your dababase is in the same server as your application, use
localhost
in$host
or use the IP or host name of the database server if the server is external.most PHP applications has a config file. database connection is mostly in the config file, for example,
wp-config.php
is the file WordPress use to store the database connection. Find out which file your php application is using to connect to database and change the database host to the IP of the external server.Yes, it is pretty much possible and doable.