Can I host a websites MySQL Database on my laptop - php

I have finally finished bootstrap website (thanks to some help from the kind folk in this community) and was wondering if I can host the websites MySQL DB on my personal laptop while the site is hosted through a hosting service?
I have configured a PHP script to send the form data by email but I also want to send it to a MySQL DB which I can administer from my home rather than through the host provider.

Yes, you can host MySQL DB on your own personal laptop. You can check out XAMPP, for example, which comes as out-of-the-box bundle including not only MySQL but other features as well - PHP, phpmyadmin and so forth: https://www.apachefriends.org/index.html

Related

How to connect a web app in a pc with a database on another pc using php mysql XAMPP

I have a web app in php mysql programmed with xampp server.
I need to have the web server with the app files in one pc on xammp and connect it to a mysql database on another pc using xampp also I imagine on phpmyadmin as usual.
I don't know how to redirect the database, as in one pc you just put the dB name in the queries but I don't know how to do it if the database is on another pc.
I couldn't find any info online, I already can access my xampp server through ip address on another devices but with the web server and the dB server on the same pc.
I need to have the web app files in one pc and the database in another, using xampp in both pc. So I can connect other devices as clients and use the web app normally.
Please help:( it is for a project :(
Edit:
I am beginner, so I really would like a detailed explanation with examples please so I can replicate it.

How to distribute a working php webpage through windows office network with limited user rights?

I have developed a table based view.php, which consists of a local mysql database part, that does a remote left join on external oracle databases (read-only) from our partner company.
All working fine on my local machine so far. Now to my problem:
I need to somehow distribute the view.php to every windows 7 computer in our office network.
We have absolutely no chance to install or execute any files (or
local webservers) on our computer/network. Anything, that requires
administrator rights will not work.
Simply getting the administrator password or asking about any
changes to an administrator is out of question.
The oracle databases (read-only!) are secured with a firewall, which
only permits connection requests from our static ip on our working
machines.
Considering the mentioned limitations above: how can i make the php file accessible to the other machines in our office with a working external oracle database connection from the office ip without the possibility to install a webserver or in general without execute rights? is there anything else i can try?
Is there a way to publish the view.php on a remote webserver and somehow connect to the oracle databases from our local ip instead of failing by connecting from the webservers ip?
Any help is highly appreciated.
Thanks in advance.

Deploying a website and a system

Good day.
I' have a thesis. It is composed of a website, php based and a system which is vb.net. My website's database (mysql) is connected to the system. I test my system and it is working properly.
My problem is how am I gonna deploy my website to the internet and somehow, also connected to the system I created. I'm going to host the website because it's for a short time only.
I'm going to buy a domain at godaddy.com. My laptop will be the host for the both website and system.
Can i use filezilla? Is my logic possible?
Sorry for the wrong grammar or bad logic. I'm a student and a beginner. Hope you understand. Thank you in advance.
You may be able to do this, but the site will only be available if and when your laptop is online and connected to a known, static IP address, because you'll have to configure the DNS servers at GoDaddy to point to that IP address.
You may need to purchase a hosting package with MySQL, and put your database and application up there. You can update the site with Filezilla, yes.

is it possible to create a system that is connected a website with the same database

Good day. I have a thesis project. it is composed of a webpage created on php and a system using vb.net 2008.
As of now , they are both connected to the same database.
I am wondering if it is possible that if i packaged the system and live the website, will still be connected with one database? Thank you in advance.
If I understand you right (and the question could be better worded), you're asking what happens if you deploy the website on a different server than the one you used to develop it. The short answer is that, unless the machine hosting the database is accessible to the web server host machine, that you would also have to redeploy the database.
In other words, wherever you move the PHP-based website and VB.NET system, they would need to be able to access the machine hosting the database server. Otherwise, I see no issue with them both accessing the same database.

Clueless on how to put my PHP project in the Internet

Good day!
I've searched for many sites on how I could deploy my PHP projet in the internet but I don't know how to do it because I am confused with some of the technical terms.
You see, I am using xampp for my local web server. Now I want to put it in the internet. I found some free web hosting sites so i've decided to upload all my htdocs files inside it.. But how can I put the xampp (apache server) and my mysql database on it? I'm confused. Please help. A step-by-step procedure of what should i do could be really helpful. Thank you in advance.
Get a hosting account (try www.bluehost.com for instance).They will set you up with a Linux server and MySQL. You don't have to install Apache or MySQL, you will use whatever they've got. All you need to do is upload your PHP files to the right folder, setup your database on their server and you should be good to go.
If you buy a domain-name and space, connect them using the NS settings
If you are using a free, then the settings are already okay.
Export the database from your XAMP.
Login to the remote server. There you'll find PHPMyAdmin. Import the database.
Upload the file.
Make sure file listing is off. That is if a user goes to any directory he can not see the file list!
Done :)
Simplifying a bit, there are two ways you can get your site online.
First, you could purchase or rent a server that is yours and yours alone. This is commonly called "dedicated hosting" and costs somewhere around $100 / month. If you choose this option, you have your own server housed in a datacenter somewhere, and you must install Apache, MySQL, and any other server software you care to use.
I doubt, given what you've described, you have chosen this option.
Second, you could rent "shared hosting" from any one of the dozens of hosting providers out there. If you do this, with a typical cost of $2 to $10 per month, the hosting provider is administering the server. You have no direct access at all. Your only access is through the tools they provide.
Given that, how specifically you can upload files is up to them (is it FTP? SSH? a horrifying web-based upload tool of some kind?) Similarly, how you access your MySQL databases (assuming they offer MySQL databases) is entirely up to them as well.
Many providers now use a tool called cPanel for this administration, so you may try browsing to www.example.com/cPanel (using your domain) on the off chance that works. If not, though, follow the instructions your host provides. Only they can correctly describe how their setup works.
The hosting will be already having apache and mysql installed you only have to put your files thats it
I suggest you contact your webhosting site. The web hosting needs to host php, and mysql. Then you can upload your files to their web server, and copy your mysql database to their mysql server.
You do not need to transfer xampp to your host: apache and mysql are running on nearly every server
Upload all your files in your htdocs directory via ftp to your server
To transfer your database, use phpMyAdmin. It is installed with xampp and alos installed on nearly every server. In phpMyAdmin, use the export/import functionality
In your php file where you connect to the db change the login settings to the settings the hoster gave you
That should work...
Hosting Company already have setup for apache,php, mysql. All you need to uploads all your
files from xampp htdocs to a right folder like public_html using a ftp software like
filezilla. They also provide a control panel like using which you can manage your mysql
database and all others settings like directory permission.

Categories