This may sound like a dumb question, but I'm new to this. I'm setting up a website, and I want it to be able to have access to a MySQL database. I've recently downloaded MySQL 5.6 and have used the Workbench and Command Line Client to learn to make databases.
But all of this seems to be running of localhost, so I think it's just running off my computer, and when I shut it down the website won't be able to access it. Is this correct? Do I have to run it somewhere else to keep it accessible to my website 24/7, even when my computer is off?
Currently its running on your localhost or your computer. To make accessible website 24/7 to need to using hosting services like, Godday, Hostgator, bluehost or there hosting.
You can purchage you domain at very low cost with full services on Godday with full support.
Source: https://en.wikipedia.org/wiki/Localhost
In other words: every computer is its own "localhost", not just yours, and generally MySql and other database engines use
localhost
as default value.See also https://dev.mysql.com/doc/refman/5.0/en/connecting.html
If you want to have your database accessible from the net without to use an external hosting service you have to keep your computer running 24/7. Don't forget to buy a good UPS (uninterruptible power supply).
Well, yes it is running of localhost unless you deployed it on another server. Yes, you have to run it somewhere else if you want it to run when your PC is turned off. In fact, if you want to make a website and use a database for it then there are many services out there that provide free hosting and come with a MySQL database.
An example would be freehosting.com without intending to do advertisement. A quick research would show you many alternatives.