How to use MySQL in a C# / XAML project - mysql

I've been searching around the web trying to find out how to use MySQL in a XAML project.
I've seen a bunch of examples where functions like MySqlConnection(...) are used and so forth, but none of them mentions if a specific assembly is necessary or if it's something you need to download first - like a dll.
Something like that is needed since it doesn't work straight away.
Anyone knows that?

You have to download and install MySql .Net Connector. Tool provided by MySql to connect with .net. This will have the assemblies used to connect .Net Applications to MySql.

Related

What tools do you use to connect to AWS Athena via JDBC

I am trying to connect to AWS Athena via my Windows as well as Mac system. My goal is to have a SQL Editor that I can use to perform quick research about the data. I was trying to find tools and tutorials for connecting to Athena. So far I have only found some tutorials around SQL Workbench. What are some other tools that you guys leverage and is there something particular that you like about that tool and how easy was it to setup either on Windows/Mac.
I use SQuirreL SQL for connecting to Athena. It has served the purpose so far. Once you import the JDBC drivers(you can download them from AWS's site) the tool itself is pretty straight forward to setup. The URL that you can use to connect can be seen here -
jdbc:awsathena://AwsRegion=<AWS Region>;User=<AWS Access Key>;Password=<AWS Secret Key>;S3OutputLocation=<S3 folder>
I'm pasting the "Overview" of SQuirreL below:
SQuirreL SQL Client is a graphical Java program that will allow you to
view the structure of a JDBC compliant database, browse the data in
tables, issue SQL commands etc, see Introduction. The minimum version
of Java supported is 1.6.x as of SQuirreL version 3.0. See the Old
Versions page for versions of SQuirreL that will work with older
versions of Java.
SQuirreL's functionality can be extended through the use of plugins.
A short introduction can be found here. To see the change history
(including changes not yet released) click here.
For a more detailed introduction see the English or German of our
paper on SQuirreL.
Susan Cline graciously took the time to document the steps she
followed to setup an Apache Derby database from scratch and use the
SQuirreL SQL Client to explore it.
Quite some time ago Kulvir Singh Bhogal wrote a great tutorial on
SQuirreL and published it at the IBM developerWorks site. He has
kindly allowed us to mirror it locally. The tutorial is not really up
to date but especially for doing the first steps it is still of help.
SQuirrel was originally released under the GNU General Public License.
Since version 1.1beta2 it has been released under the GNU Lesser
General Public License.
Another tool that I have used pretty extensively is SQL Workbench. This is also sort of recommended on the AWS site. The is good, but I found that it would hang up sometimes and I would loose my work.
Both of these can be easily downloaded from the links provided or if you like to use CLI then Homebrew can be used on MacBook or Chocolatey on windows
Some other tools that you can use are DataGrip by JetBrains. Guide to setup the tool can be seen here. The functionality of DataGrip is also built into IntelliJ Ultimate Edition.
DB Visualizer is another tool that can be used to connect to AWS Athena the guide to connect can be found here
TeamSQL and Razor SQL are some other tools that you can leverage.
One of the strengths of JDBC drivers is that as long as a tool supports JDBC, you can use it for any data source which has a JDBC driver. First, get the JAR file for the JDBC driver for Athena here: Amazon Athena Connect with JDBC. Java works across platforms, so as long as you have Java in your Windows/Mac environment, you should have no problem using any of these tools.
The tool SQL Workbench/J is fairly popular, but I find it frustrating to work with when switching between multiple databases.
Another tool is Squirrel SQL, which also supports JDBC drivers. I prefer it, but it looks a little less pretty than SQL Workbench/J. Once you've downloaded the JDBC driver, configure it in SquirrelSQL by going to Drivers and then adding a new one. Label it "Amazon Athena" and specify the Example URL as jdbc:awsathena://AwsRegion=[Region];User=
[AccessKey];Password=[SecretKey];S3OutputLocation=[Output];
[Property1]=[Value1];[Property2]=[Value2];...
Leave the Website URL Blank, but specify the Class Name as com.simba.athena.jdbc.Driver. Add the .jar file of the JDBC driver to the "Extra Class Path" page.
Once you've set up the driver, you can set up connections by going to the Alias tab and hitting the plus sign. Simply fill in the values in the example URL to point to your data source. Once you're connected, you're good to start writing queries.
SquirrelSQL saves the connection information for you, allowing you to quickly jump between data sources, and makes it easy to write multiple queries in one input window, with their outputs going to separate tabs in the output pane. I've used it for database, exploration, DDL, and regular day-to-day tasks with data. It's been good for most anything I've connected it to. It is definitely not perfect, but it's getting better all the time.
I guess you need a Docker SQL Editor that you can use to perform quick research about the data.
But I suggest two ways.
One is Offline/Online and with installation methods, which you can use with a fixed connection.
The first solution is to select a system as a server and connect to it from other operating systems. This is the traditional / old solution.
In the second solution you just need to be trained to work with Docker. This is a newer and more popular solution.
if you want use MySQL in MAC read this article :
Installing MySQL in a Mac OS X environment
If you want use MySQL in windows read this article :
How to Install MySQL on Windows
But you need a synchronous space for use MySQL or other DBMS you can use docker.
Docker is very Flexible . But you need connect to internet.
If you want use Docker read this article and view docker site :
Docker : SITE
Docker Doc : Start a Remote MySQL Server with Docker quickly

Bundling MySQL with an application

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.

dll files for creating a setup

I 'm working on an application using rad studio 2009 (c++) and mySQL. I want to build a setup so I can set up my application and on other PCs without installing and rad studio. As far as I 've searched, I will need some dlls. Does anyone know what dlls? I couldn't find out...
please help!
For C++ Builder if you don't use runtime packages and you link against the static RTL then you don't need to supply anything beyond the compiled .exe.
I couldn't say what you need for the database connection, but I imagine it is documented and Johan has provided you with an answer that addresses this part of your question.
Dependency Walker can be used to investigate the dependencies.
You need libmySQL.dll
and if you're using dbExpress you'll also need: dbxmys.dll
If you're using ZEOS you'll only need the libMySQL.dll, but AFAIK only ZEOS 7 alpha works in Unicode Delphi/C++ Builder
Be careful to make sure libMySQL.dll is is the exact version that goes with the MySQL server you are connecting against.

Use webdeploy from VS2010 to publish a MySql database

I'm using the WebDeploy tool from Visual Studio 2010 since a few weeks and really like it. I was now trying to deploy my database as well using the 'Package/Publish SQL' tab. However, my current project uses a MySQL database and it seems that web deploy from VS is only compatible using MSSQL (sigh).
So my question is: can I get it to deploy my MySQL database? I know there is a custom 'dbFullMySql' provider, but not sure if this can integrate into VS2010. Thanks.
could this be of help to you http://blogs.iis.net/msdeploy/archive/2009/04/29/changes-to-the-custom-provider-for-mysql-dbfullmysql.aspx

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.