Can MySQL be set up locally on a development computer? - mysql

Is there any local MySQL database which I can create on my system, just like the localhost we run on our system.
I never thought of this situation since we have our beta servers and live servers with database already set up in our offices.
I am creating an app on my own, that's why I need to setup a local db of mine.

You can use WAMP (or LAMP on linux) which is an integrated web development environment giving you access to your own LOCAL SQL databases accessible through your own machine's localhost. You will have full control to be able to create tables and administrate it. I am currently doing that myself
WAMP

Related

Where are databases stored?

Where are databases actually stored? Do we store the database in the web server itself (like NGINX or Apache), or do we have any other kind of server dedicated to only the database, if this is the case, how would we connect to the database from another machine?
For example, I've tinkered with MySQL databases stored in my local machine, which i used to create web applications: how could i store (host) those databases somewhere else in another machine and still use them in the same web application running on a completely different machine?
Where is the database stored?
The database -- the relational database management system -- is a network-accessible hunk of server code. MySQL, for example, is a server software package.
That server software runs on a computer -- in internet parlance a server machine -- somewhere. Maybe it's on your laptop. Maybe it's on a server machine in the next room. Maybe it's on a virtual machine you rent from AWS,Azure, Digital Ocean, or some other cloud vendor.
The machine hosting the database for a web site can be the same machine that hosts the web site's web server, or a different machine. Modestly sized web sites often run the database and the web server on the same machine. Bigger sites often have multiple web server machines all using just one database machine.
As long as the web server code can reach the database server via a TCP/IP connection, you have a working configuration.
Where is the database stored?
The database server software uses the file system (disk, SSD drives, or network-attached storage) of its host machine to store the data in its tables. The structure of the file-system files used by the database server software is a huge topic far beyond the scope of a StackOverflow answer. Suffice it to say that those files are useless without the database server software to read, write, and back them up ( with a few special exceptions).

MySql how to collaborate remotely ona project

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.

Connecting to a remote MySQL database on a local PC using another PC

I want to develop a project for some college work. For this project i want to create a database in MySQL and I should be able to access this database from 2 different PC's which have MySQL workbench installed on it. I can use one of the PC's as the server or even a third PC as the server for the MySQL database. Someone please help me in doing this as i am unable to find any solutions online.
There's not much of an issue here.
Download and install the server from here.
Then install it on a computer within the same LAN of other computers
that will query the database.
Get the local ip of the computer on which the server is up and
running (on windows run cmd and then ipconfig) then look for
IPv4 Address value of the LAN.
Then establish the connection from other computers using that ip
value as host value configuration.

Wordpress: MySQL Database and UNC Share

I am about to install WordPress on a Windows 2008 server - two load balanced servers with a UNC share. Web browsing using the server is out of the question (IT security policy) so using the Microsoft Web Platform Installer is also a non starter. I will therefore have to install it manually.
So far I have installed PHP (routine), but I now need to install MySQL and create a database. However, with these being two separate servers, what effect is this going to have on the database - will this require a database on each server? Will they remain in sync? Can the database itself be put in the UNC share?
In short, can anyone advise me whether this is possible and how to go about it?
Thanks
Install MySQL and create the database on the server which is supposed to have it - preferably a 3rd one or on the UNC. In the MySQL config, enable network connections via my.cnf, specifically the bind-address.
Both the PHP boxes should connect to that one MySQL db (using it's LAN ip address). (And yes, they would remain in sync since they connect to the same db.)

How do I connect VS2010 to a MySQL database (locallay on another computer)?

I have a MySQL database on another windows computer (a server) that is setup locally using remote desktop connection for testing.
How can I connect to that local database to Visual Studio 2010 on "my computer"?
Server Computer(MySQL database setup local) --> My Computer(Visual Studio for test code..)
I am new to MySQL and any suggestions will help.
Thanks
PS: I have found this, but the "Server Name" for the database is 127.0.0.1 which I can't use because it is local on whatever computer you are on.
http://geekswithblogs.net/mbridge/archive/2010/12/13/visual-studio-2010-hosting--connect-to-mysql-database-from.aspx
You'll have to use the address of the computer that it is hosted on. It should be the same as the address you use to connect to the remote desktop session.
You might need to configure the firewall to accept the connection. You also might need to setup MySQL to allow remote connections with the user that you authenticate with.
I would recommend downloading MySQL workbench and install it on your local computer. Once you get the connection working with that, you should be able to use the connection with VS2010.
If you're not sure how to do the things listed above, you'll need to start out with a basic tutorial on setting up MySQL for remote connectivity.