Install MySQL Automatically on WIN, Linux, macOS - mysql

I want to use MySQL for an electron app in production and thus, if the client machine doesn't has MySQL already installed on it, then the app will not be able to function. So, is there any way to execute a auto-install MySQL script that installs MySQL on the client machine, even if its not already installed.
Since the app has to be cross-platform, so I am looking for a standard or minimum effort procedure (to speed up the process) to achieve the above, during first-time-app-startup on Windows7+, Ubuntu 14+ and macOS.
I found the following ways to auto-install:
Windows : Link
Linux & macOS: Create a bash script that runs before first-time-startup of the app. (Although, it will check whether MySQL instance is already present on the machine or not)
Looking for a better option than the above mentioned ones.

You may wish to consider the BitNami MySQL distribution; I have always used their VMs when I went after their products, but stand-alone installers are offered for most platforms (including Linux).
(Edit: It seems that the installer for MySQL is offered only for Linux x64)

Related

Portable MongoDB and MySQL/PostgreSQL binaries

I'm currently developing a Python application and I would like to know if there are any ways to pack MongoDB and MySQL (or Postgresql) into the application. By packing I mean taking those application binaries and distribute them with the application files.
For example, Metasploit PRO has some applications like nginx, postgresql, java, ruby, etc... under /opt/metasploit (they come with the application setup), and I would like to know if that could be done with any Linux application. And if so, how could I "choose" what binaries are needed? Would they work for any Debian distro? Can any application follow that procedure? Could it be done with MySQL and MongoDB?
P.D: I would like to do this to distribute one unique application instead of having to "obligate" the user to setup the databases independently, and for pure curiosity.
Thank you very much in advance!
MongoDB already distributes its binaries as standalone binaries in the sense that everything needed for the database (or shell tools) to run is included in the respective binary (mongo/mongos/mongod).
However, these binaries are OS (Linux distribution)-specific. Meaning, for example, they dynamically link against libssl and libcurl and you need to have the right versions of those libraries on the host system. So, for example, a MongoDB binary for Ubuntu 14.04 is likely to not work on Ubuntu 16.04.
As far as I know MongoDB does not support building for "generic linux". Only specific OSes like Ubuntu 16.04 are supported.
With that said, you could possibly build a "portable" MongoDB yourself if you accept some limitations, since its source code is available:
You need to figure out how to build MongoDB on some linux distribution that gives you the baseline glibc that would be compatible with all of your targets.
You may have to forego functionality like TLS connections, or figure out how to link against openssl statically (probably non-trivial).
This would be easier with older MongoDB versions (4.0, 3.6) since they have fewer system dependencies.
I think you can pack the required services and your application as Docker image or Virtual Machine box.
As my experience, I used to package the MongoDB and other Linux CLI tools with my NodeJS web application into a VM box using Vagrant. Or you can use Docker if you prefer container-based application.
If you use Vagrant, the provisioning feature may help you to setup the database before running the application. Check https://www.vagrantup.com/docs/provisioning

proper download url for mysql for mac for this scenario?

I'm developing a system for a client and I think he may only have a Mac. I recently downloaded and installed MySQL on my Windows laptop for the first time. I think I stumbled around a bit trying to get the correct download and understand the install process. When I google MySQL downloads, I get the following url:
https://www.mysql.com/downloads/
The header on the page says "MySQL Enterprise Edition." Usually, the "Enterprise Edition" of a company's software costs money, but in the case of MySQL is it free? The following tool was installed with my local install of MySQL:
MySQL Workbench 8.0 CE
This is the standard client tool for MySQL, I got the hang of it pretty quickly, so I'd like to simply standardize on it. Can you provide a good download url for the latest free version of the Mac version of MySQL? Can you also provide a good download url for the latest free version of the Windows version of MySQL just so that I have it for reference?
Like I mentioned, it was my first time installing MySQL recently, but I think at the end of the installation, a Window popped up asking how I wanted to configure the MySQL installation, but it so happened that the MySQL installation was already complete. Or does this scenario most likely seem to indicate I had already installed MySQL and the configuration popup was just the installer's handling of my attempt to install MySQL on my machine when I had previously installed it?
Look all the way down to the bottom of this image:
Click on "MySQL Community (GPL) Downloads". It takes you to https://dev.mysql.com/downloads/ which is where you can download the Community Edition of MySQL Server.
They don't restrict downloads of their free product, they just put it in a smaller font. :-)
It's understandable that they would want to promote their paid product.

How can I install different versions of MySQL on Windows 10?

I would like to install different MySQL versions on Windows. I have a MySQL 5.5 running, and I want to install a MySQL 5.7 to debug compatibility issues of a program I am working on. Both installations should stay side at a side, may have their own databases (it’s OK to start with an empty 5.7) and I am happy to run or stop the one or other from the Services control panel manually. The nowadays MySQL installer - community wants to upgrade my existing installation and, unlike explained in this article, does not offer another option to install the versions side to side. All I found was a rant confirming my problem, but no real solution. If it requires me to install it manually, I need detailed instructions. In my case, default setup (default port) is sufficient, because I don’t need to run both instances the same time.
This is not so obvious but using the "MySQL installer", you need to run it, then click on "Cancel" and a new window will appear, letting you install new elements. You can then select the version(s) of MySQL that you want to add to your system.
You don't need it but if people want to run several instances at the same time, they need to choose a different port for each installation.
Why not simply use a virtual machines to install your different MySQL version ?
Like that you will be sure to have no compatibilty issues between them and you can start/stop vms as you like.
Otherwise, I did find that : https://www.codementor.io/arpitbhayani/setup-multiple-mysql-servers-with-different-versions-docker-du107solq but can't confirm it's working.
Use Dockerized mysql and you can run as many mysql versions you want on different ports.

How do I update phpMyAdmin on EC2 LAMP Server?

I have a LAMP server on an EC2 instance. I downloaded phpMyAdmin using Amazon's guide here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html.
On the phpMyAdmin page it says that:
"A newer version of phpMyAdmin is available and you should consider upgrading. The newest version is 4.6.5.2, released on 2016-12-05."
and I need to update it and also MySQL to use new features they put on the updates.
I'm accessing the EC2 instance from the terminal in my Mac laptop. I've tried a lot of things but I couldn't manage it. I've tried
sudo yum install -y phpMyAdmin
sudo yum install
I tried to manually download the latest version from phpmyadmin.net and change the files in the folder but I couldn't access the phpmyadmin folder in the first place.
Any help would be appreciated,
Thanks
You're using the version of phpMyAdmin maintained by your distribution (presumably Fedora, CentOS, or Red Hat); this means that basically you're not responsible for (or able to) upgrade the software that's under control of the package manager (aside from running the updates occasionally). If you wish to use a different version, you're certainly able to remove the package manager version then install it manually. I don't use EPEL, but I believe the highest version currently distributed is 4.4.15.9 (reference, which I think is because of the older versions of PHP and/or MySQL which are currently shipped. So you might not be able to upgrade due to your MySQL or PHP versions, but YMMV.
Basically, if you're using the package managed version, the whole point is so you don't have to worry about manual updates.
You can disable the notification by adding the directive $cfg['VersionCheck'] = false; to your config.inc.php (which may be in /etc/ or /etc/phpmyadmin, but I'm just guessing about how your distribution may handle it.).

How do I setup a visual MySQL client if I already have MySQL installed in my system?

I have downloaded the MySQL from the following link:
http://dev.mysql.com/downloads/mysql/
Downloaded the version 8.0.0. I have OS X 10.10.5
Now, I suppose I need to configure a visual MySQL client on my laptop to write queries. For that, I have installed sequelpro (sequelpro.com).
I need help on following points:
- Since there are a number of sample databases which one can use to learn SQL, can you please guide me on few such databases. My objective is to learn advanced SQL.
- Also, how do I configure my client (sequelpro) to connect to that database so that I can run queries.
As of now, I am stuck with the following screenshot with no clue what to do next.
Thanks a lot. Screenshot here
Based on the fact you said in the comments you have OSX and you installed mysql manually without phpmyadmin I suggest you download and install mamp.
mamp
1: https://www.mamp.info/en/ is,
MAMP installs a local server environment in a matter of seconds on
your computer. It comes free of charge, and is easily installed. MAMP
will not compromise any existing Apache installation already running
on your system. You can install Apache, PHP and MySQL without starting
a script or having to change any configuration files! Furthermore, if
MAMP is no longer needed, just delete the MAMP folder and everything
returns to its original state (i.e. MAMP does not modify any of the
"normal" system).
Basically it is a fake server that runs on your computer. This will be yours for localhost development. You can use it to serve your localhost php applications, change versions of php and gives you a GUI for mysql which is phpmyadmin.
Once you install mamp
you might need to configure mamp to use the mamp mysql but most likley it will work out of the box. If you do run into any problems make sure you stop the instance of mysql you installed already before running mamp then trying to ran mamp again and it should be using the correct version.