Bundling MySQL with an application - mysql

There are alot of applications like MAMP, WAMP, etc. That come with a version of mysql that needs no installation and can be turned on and off easily. I am trying to create a web based application that will use a mysql database, where do you get mysql to bundle and how is it done so the user doesn't have to install it?

you can get it mysql
http://dev.mysql.com/downloads/
you can used php, ruby (rubyonrails) or java for developed application. in the case php install xampp.

MAMP, WAMP, etc. all have a bunch of configuration that is already set up for them. Essentially they've installed MySQL and everything else included under a single directory that doesn't rely on anything outside that directory and then zipped it up together. I'm not sure exactly what you're trying to do, but that really seems like overkill. May I suggest checking out sqlite? It's designed for bundling and embedding and will be quite a bit easier to deal with.

Are you truly creating a Web Based app or are you wanting to create a desktop application using web scripting languages?
If you are creating a web app, you shouldn't need to bundle MySQL since when you deploy to your hosting environment it should already be in place. If you truly need to package everything you'd be best off offering your software as a virtual machine appliance with the appropriate services already configured and running.
If you are creating a desktop app, that's a whole other issue.

Related

Setting up a Grails / Groovy Server Pages project on Visual Studio Code for MacOS

I have some HTML/CSS changes I need to make on an existing project for a client. I already cloned the repository on my machine but I'm not really sure how to set it up to view the changes locally.
I'm seeing lots of files with the .gsp extension and after some googling I discovered those files mean this is a Grails/Groovy Server Pages project, which I have zero experience with (I'm a Front End Developer btw)
I already located all the HTML/CSS code I need to change, so what I need to do is learn the basic commands to get the project running locally so I can view the changes after I make them before pushing to the actual repo.
Anybody has an idea on how to set these kinds of GSP projects up on Visual Studio Code for MacOS?
Any help would be very much appreciated!
I think the easiest approach for you would be to start Grails separately using the command prompt. Identify the version of Grails for your project, and follow the instructions from Grails to setup the dev environment.
Also, remember you probably also have some sort of database to install and initialize.

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

Ruby Server with MySQL

So, I'm writing a basic application, with a html5/jquery front end and a ruby backend. I've never used a ruby backend, and was wondering how I'd go about that. I am going to be using MySQL, very much like an Apache/MySQL/PHP thing but without PHP. I will need to eventually put the application on some sort of web server. For now I just need something local so I can develop it. So, is there a WAMP for ruby instead of php? I've been reading and Ruby on Rails seems like it may be what I'm looking for, but I'm really not sure.
So, what kind of platform do I need to learn in order to do this. I want to use ajax if possible(ruby backend). How do I go about setting up my environment.
Sorry if my question is somewhat vague, thank you so much for the help.
IMO railsinstaller is the way to get started on Windows.
For getting started with Rails itself, Hartl's Rails Tutorial is great.
When I was developing in Rails on Windows I used rails installer as Dave Newton said. For local development you can either use the bundled database SQLite and the bundled WEBrick server which means you don't need to install Apache or MYSQL. If you really want to though, XAMPP worked for me to provide MYSQL and Apache services on Windows.

COCOA Objective-c : How can connect to mysql database?

I am creating application for MAC using cocoa framework, I would like to know how and what are the ways i can connect to MySql database using cocoa framework.
You might want to look into http://www.sequelpro.com/docs/Source_Code. They seem to have resurrected the original MySQL-Cocoa code and it seems to be under active development. The other option is the commercial MacSQL Framework.
Edit: You might also want to look at the following tutorial. It is a great introduction in using the libmysqlclient and even provides a sample Xcode project.
Short answer: You can't, at least not directly.
The Cocoa Framework doesn't have a database driver, generic or otherwise (CoreData notwithstanding). In order to connect to a mysql database you need to use the aptly named libmysqlclient. This library is not included with Xcode, and as such will have to be downloaded (and probably built) separately: You can get it from here.
You'll probably have to distribute the library with your application, license issues might result.
Edit: It seems as if a library for connecting to the mysql database should be installed together with a MySQL server install. If the application will only need to run on machines where MySQL is installed, you might get away with linking to this.

Use WampServer's MySQL as a real MySQL for going on the net

Is this a right thing to do? I am using the Apache/Tomcat that comes with the liferay portal bundle and I used the MySQL that comes with WampServer at home but now I want to transfer my portal to a real Server and I wanted to know whether I could still use the Wamp's MySQL or should I install a real MySQL (What's the difference?)
Thanks in advance.
WAMPS MySQL server is not artificial, its the real deal. WAMP just bundles these softwares together and lets you deploy easily for development purposes. In a production environment you would deploy MySQL as a separate software and tweak it according to your needs. You CAN you WAMP on production environment, however you will need to make sure that you do not have any security flaws in there.