I have developed several websites on my local host for school. I can program database driven aspects of a webisite such as a blog on my own no problem. At school I used a MySQL DB which was hosted on a dedicated server, so when the server went down I could not have access to my data. I also have a mysql DB on my localhost but...my question is this: If i use the MySQL DB on my localhost, won't I only have access to the data when my computer is running so that my site can make server requests?
How can I set up any kind of DB for my site that is reliable and doesn't depend on my localhost to act as a DB Server?
I am now developing in .NET
Thanks. PS I don't have access to schools' server any more.
PPS I still don't have a site set up through a hosting provider...probalby going to go with godaddy
You'll need a server for that. A server will cost you on a monthly basis, I haven't heard of any free mysql servers, someone else may be able to help you with that.
Regular hosting providers supply PHP and MySQL server. I run my sites on Dreamhost (www.dreamhost.com)
It might also be worthwhile to look into Amazon EC2 : http://aws.amazon.com/ec2/
Also Amazon RDS for pure database only usage : http://aws.amazon.com/rds/
They provide a pay as you use service and the tier 1 service is free for the first year as I understand
There's no magic, you have to host your DB on a server that will run 24/7. Could be on the internet, it depends on the firewalls surrounding you.
The website will always depend on some sort of database server, why so worried that your database will be unreachable? Your webserver can go down also and will have the same consequences as the db.
Why don't you get some paid hosting? It is fairly cheap these days, for around 30dollar/year you will have some reliable hosting. When the DB will break down, it is not your responsibility.
If you don't want te be dependent of MySQL, you will need to use plain-text database that will be maintained by PHP or something.
You might consider running the MYSQL in i.e. a cloud provider, like Amazon EC2. It will certainly cost some money.
Related
Me and my friend have to do a project in Mysql and i am trying to find how me and my friend can work on mysql together from our own workstations. Is there a way where we both can work on the same database together without being physically present.
I am fairly new to mysql.
Just take cheap shared hosting that has MySQL databases and preferably also PHPmyAdmin and cPanel or any other panel to easily manage your databases. In that way, you have minimum hassle to create and manage databases that you can both access.
Google "compare cheap shared hosting" and that's it. Or take this quick Google result I got: https://www.pcmag.com/picks/the-best-cheap-web-hosting-services
If you're not happy to pay $1-$2 per month for hosting then you can install WAMPP or XAMPP on Windows machine but then you'll have to also Google how to forward ports from your router.
Edited 3aug2020: For a free MySQL hosting for up to 5MB free storage please, check https://www.freemysqlhosting.net
You can use a program like XAMPP to host mysql and port-forward phpmyadmin so your friend can visit your db
https://www.apachefriends.org/index.html
If you have MYSQL running on a server or your local computer you can both access phpmyadmin (http://server-ip/phpmyadmin) you can also use programs like Navicat (paid) or HeidiSQL (Free).
You can make the database remotely accessible, in which case your friend can connect and work on it as well.
Without knowing more about your network setup it is difficult to say how you should proceed, but generally it is enough to spin up a mysql-server instance on the host machine, then forward a WAN port to the LAN address and port of the host machine.
I am using MySQL workbench on windows, which I want to connect to a Node-Red running on the IBM cloud. Since I don't run them on the same server the host 127.0.0.1 and port 3306 does not seem to work. What permissions should I give?
I'm going to make a LOT of assumptions here, because there really isn't enough information in your question.
First assumption, by "running on IBM" you mean that Node-RED is running on the IBM Cloud hosting service.
The short answer is you can not do what you want.
The longer version is that you probably could actually make this work but doing it is a REALLY bad idea.
Second assumption, you are doing this from home (even if you are doing it from a office location the same problems are likely to apply). This means you are connected to a local LAN using RFC 1918 address range (e.g. 192.168.0.x), this means you are behind a router that is performing NAT (Network Address Translation). This means you are going to need to set up portforwarding on the router so that when traffic arrives at the router it will send it on to your Windows machine. How you do this will depend on your router.
Next problem, your broadband probably doesn't have a static IP address which means it will change every time your connection drops. There are work arounds for this using things like Dynamic DNS. But that's too complicated to get into here.
Assuming you get all of that sorted out you still have the problem that you have now exposed your mysql database to the internet, so you need to make sure you have enabled all the right security measures to prevent people logging in and at best seeing all your data.
There are 2 much better solutions to this
Run Node-RED on the same machine or at least on the same local network as the database.
Use one of IBM Clouds hosted database solutions, these are a lot easier to connect to a IBM Cloud instance of Node-RED.
If you do not want to open ports to your network I recommend using a free MYSQL remote server
A simple website is https://remotemysql.com
Just take the screenshot of the credentials of your database after registration.
Keep in mind if your database is empty it will get deleted after some time.
I'm a newbie to web development. My team at school is using J2EE and MySQL to develop a web app that will be deployed on AWS. We use GitHub for version control.
I am just wondering if I use MySQL from my terminal to add tables into the local "test" database, how can my teammates have access to them? Should I deploy the database somewhere or maybe create the tables in code so that my teammates can automatically have the tables in their local database when they run the code? But how can the data already stored in the database be shared then?
Sorry to have this naive question, I tried to do some research online but it seems that the results are more advanced and about PHP not J2EE... It will also be great if you can recommend some good resource for me to read through since I believe this is a very fundamental concept that I should know.
You can maintain the database's schema in your code so it can be committed to source control and accessed by the others. This is a good practice regardless of how you use a test database for the development.
Your team members will not be able to easily access your local database. For a distributed development environment it would be best to host your test database on a remote server, such as on an EC2 instance in a public subnet or in RDS. Then you can pass along the database's connection information (host, port) and credentials to the other team members.
Pay attention to the security group when creating the database either in EC2 or RDS. You can open it up to the world (0.0.0.0) or narrow it to just your team members' IP addresses to tighten security. Otherwise the team members will not be able to connect to the database.
It's hard for your team members to access your local database from another computer. It's a lot better to host your database on a remote server, such as a EC2 on AWS or Computer Engine on GCP. Then you MySQL database can be accessed by anyone with an authorized connection and whitelisted IP address.
Another solution is using a cloud-based data warehouse like a Snowflake or Acho Studio. Once you have the MySQL database connected to the DW, your teammates should be able to access the tables you've authorized them to see.
This way you can also share your SQL queries with your teammates so they can run them against the MySQL server themselves.
You can create a test environment using VM or containers and share it with your team members. You should pay attention to how to keep track of the changes in these test environments as well. The following answer describes how a db with schema can be shared using a docker image. You can version control these images so you can track the changes.
Are there any database only hosting services?
I need a MySQL only hosting service but I couldn't find any. All mysql hostings are part of a package e.g. PHP + MySQL.
I need it for development purposes. Having my PHP files somewhere else I can remotely connect to this mysql server and once an application is ready I can put that on a server having both PHP + MYsql. [well, there a some reason to have this kinda setup, if you have something to suggest please do.]
Any suggestion/recommendation if you have used any.
Thanks
The problem with a database-only host would be the security. The database need to be accessed over the Internet, thus username and password to access it are sent over the Internet. Even though you could add encryption and other protection, there's still a risk that the security is breached.
In general, you should never allow direct access to databases over the Internet! It's a real bad practice, which also explains why it's hard to find.
One way to get around such limitation is by building a web service around your database. In this web service you'll add all the functionality that you need to apply on this database, and the web service itself will keep the database itself protected. There would still be a risk that your web service gets compromised but even in that case, the attacker could never do more damage than the specific web service allows.
Such a web service can be created in PHP, although I myself have more experience with doing something similar with .NET and C# on SQL Server...
I think that you can find hosts with MySQL and PHP cheap enough that it would be easiest for you just to use one of those hosts and only use what you need.
Web Hosting Buzz has a plan for $5.95 (a month) which has unlimited databases, 400GB storage, and 500GB/Month data transfer.
A few weeks after the question was posted, Amazon announced a beta of "Amazon Relational Database Service (Amazon RDS)." It acts like MySQL 5.1.
http://aws.amazon.com/rds/
Seems pricey for what you want, but you never said you were the one who would be paying the bill.
Contract a dedicated server.
Use it only to host your MySQL database
If the server is managed, they should help you with basic MySQL problems as it is usually preinstalled. I use http://www.hostingmatters.com/
If you are just needing this for developement purposes for PHP + MySQL why not just install EasyPHP (http://www.easyphp.org/). This installs quickly and easily and I think it's great for developement.
I've had no problems installing additional PEAR extensions and such after the fact with this.
There's a free option on Heroku and paid options up from there: https://addons.heroku.com/cleardb
You can try freemysqlhosting.
http://freemysqlhosting.net/
Can anyone help me understanding what can I do if I want to ship a MYSQL database along with a web based software I have. I am using a free version of MYSQL 5.1. All I want is the client should not able able to get the access to my database/tables, but my application should be able to access database when installed on the client machine.
Thanking you in advance,
you can run the database on the client machine or host it yourself, depending on the circumstances, but if you have a php application or something then the client could just take the connection details out of it, so it doesnt matter, he can access the database anyways.
If its not like that, you can do it as you like, if you can have you own database username and password. The local hosting might be somewhat faster and more secure.