Problems in website data in database design - web

I need to create a website that will display some data fetched from mysql database.
When executing it on my local machine it works correctly.
What i need to know is how do i do this same when websites is moved to the server.I mean i cannot go and create a database for my website on the server.How is this done?
Thanks in advance.

your web host or web server should provide you with PHPmyadmin which allows you to create a database. So if you login on your web host, server you should be able to see phpmyadmin, if you click on that then u are allowed to create a database for your website in your webserver.

Related

Hosting and connecting to a google cloud sql databse

I'm currently building a website that I would like to privately host so it can only be used internally. My goal is to store file uploads into a google cloud bucket then document certain things into a cloud sql db for filtering later on.
I've been able to store and pull my files from a bucket and I was also able to set up my database in cloud sql however I'm not totally sure how to send SQL query's to my database from my website. I've tried going through the documentation but I'm a bit lost as to what I need. So if anyone knows what I should be looking at that would be a lot of help. Anything like a guide on the google documentation, because I'm not sure which I need to follow or anything.
Additional information
Currently my website is hosted locally because I haven't decided on a
website hosting service yet any recommendations would be helpful.
I was using a postgres database as practice for creating endpoints and developing my database
structure.
I am using a PERN stack so postgres, express, react and node.js
If there's anything else you would like specified I'm more then happy to provide any additional information.
Update:
I was able to connect my postgres db to cloudsql. I would explain how but this video does a great job of it.
How to connect psql db to cloud sql
However I'm running into an issue when I try to connect using an SSL connection. I have the files my only issue is I don't know where to store these files.
The general recommendation is to use the Cloud SQL Auth Proxy to connect to your Cloud SQL instance.
Basically you'd run the proxy wherever you're running your webapp and then have your webapp connect to the proxy as if it were a local database.
You'll start the proxy like this:
./cloudsql_auth_proxy -instances=<INSTANCE_CONNCECTION_NAME>=tcp:5432
That will start a listener on 5432 on localhost that you can connect your webapp to.
Alternatively, you could use Authorized Networks to allow-list the IP address of the machine where your app runs.
Check out the docs here: https://cloud.google.com/sql/docs/postgres/connect-overview.

Umbraco Slow On Azure

We are currently hosting an Umbraco site on Azure and it is oddly very slow. When hosting locally it seems to run fine. I've checked that the umbraco.config file and internal index are being created and they are, so I'm guessing it is using the Umbraco XML cache to query content. Is there anything else I should be looking for?
Thanks in advance..
Azure SQL Database or SQL Server on a Virtual Machine? Check to make sure you're running your web server in the same region as the database you're using. Then check to make sure the instances for both the database and the web server are correctly sized based on workload.

IIS settings to connect ASP to separate database server

I have a simple ASP site hosted on the same server as the database.
I am trying to separate these 2 entities and place them on separate servers.
I have setup the IIS settings on the web-server and setup the database on the DB Server.
They both work perfectly individually.
I changed the data-source on IIS config from local to the target DB server db.
Changed other key-parameters and web-config files.
Now, instead of localhost directing to index page, it is re-directing to default page.
Am I missing anything else?
Open IIS, click on your site, and look at the "Default Document" section. You likely need to specify "index.asp" (or whatever) as your default document.

Connecting to multiple client's local SQL servers from Cloud based IIS

I am developing a web app that is not doing anything fancy. The parent company wants to use a cloud based IIS service to support the web app and then submit the information to the client's local SQL servers through the internet and the client's firewalls.
Traffic isn't that much of an issue, we are talking about probably no more than 10 submissions daily per client. My question is with regard to connecting to the client's SQL servers and running the Stored Proc on each server.
We already have admin privileges on the firewalls and servers to do what we need to do to make anything happen.
What would be my best/reliable/secure method to implement this service?
Page asks for 10 items of info then submits to Stored Proc, that's it... with a local IIS server there is no problem, works nice. I want to make sure that the information stays secured, not just for the 10 items, but the SQL server and any security between it and the IIS server.
Any recommendations?
I would recommend setting up a VPN tunnel between the remote IIS server and the in-house SQL server. With a VPN tunnel, the SQL server is just like any other server on the network to the app.

Get domain & subdomain of server by console application

Let's take one case that i hosted my web application on window server 2008 R2 and one exe (console application) running on that server.
I can access that web application by URI:
<subdomain>.<domain>.net , is there any way to get subdomain and domain info from EXE (C#) ?
Thanks in Advance.
The answer is... it depends.
If you only have one site hosted on your box then you can just connect to the local instance via either the IP Address the website on the machine resolves too, or by using http://localhost etc.
When you have a URL, the situation becomes more complicated. The machine could be hosting several websites - how do you know which one you want to connect to? In this instance, I would advise just storing the url you want to connect to in config.
However, it should be possible to list the all of the domains from IIS - you'll need to use WMI.

Resources