I know that there is some post about my problem in the net, but none of them has the answer I can use.
My problem is connecting to remote MySQL database using Android Xamarin.
I tried to connect using MySQL.Data.dll - there were a lot of errors about missing references.
I wanted to use SQLite, but I couldn't find any post witch shows how to use it and CONNECT to a remote database.
I cant use any PHP / HTTP script.
Is it possible to connect to MySQL using SQLite? If yes, how to do it (I need to read and update data)?
Instead of connecting directly to an sql database, perhaps use some sort of web API to communicate?
So instead of:
Xamarin app -> MySQL db.
It'll be:
Xamarin app -> web API -> MySQL db.
Related
I installed and configured sphinx search engine (v. 2.2.11) in ubuntu and integrated it with oracle database to retrieve and index data from oracle. I also can submit query through sql client of sphinx by using command line and every thing is ok.
Now my question is: How can I connect to sphinx through C#? There is no official API for .Net.ŮŽAlthough there are several 3rd party APIs, some of them not free and some will not be updated anymore. I also saw SphinxSE that is a mysql storage engine and According to what I understood, Only used when data is stored in mysql but my data is stored in oracle and I use odbc for integrating oracle and sphinx.
So, Should I write an api myself or there may be other ways?
Thanks for any suggestion
Just use SphinxQL and connect to your Sphinx instance using any mysql library. Just make sure sphinxql is enabled in your config, you should have smth like this:
listen = 9314:mysql41
This tells Sphinx to accept connections from mysql clients on port 9314.
I'm working on a project that involves linking my C# application to a MySQL server. The server is running cPanel and the company does not allow all IPs to connect to it (although you can add host IPs to the remote list). The application will be running on Windows 8 Tablets on a 3G connection, so obviously I will not know the IPs if the devices to be able to add them to the list.
A collogue of mine has told me of a system, API or something like that that will allow me to interface with the Database via HTTP effectively bypassing this restriction.
I can provide more information if needed.
Does anyone know of anything similar to this or any way around this?
If you are using MySql 5.7 or higher, there is an experimental "lab" for allowing direct access to MySQL via a REST over HTTP interface, eliminating the need for a middle-tier server or database specific drivers.
You can download the plugin at the MySql Labs site. From the dropdown, select "MySQL HTTP Plugin" and you should be good.
Keep in mind that its part of the "MySql Labs" project, which means its experimental, probably buggy and should be used at your own risk. Think twice before using them on any kind of production server.
I'm unable to connect to my database that is located on my laptop. Now I'm trying to access it locally from within the same laptop.
i'm using this connection string:
Server=localhost,49172;database=databasename;uid=user;pwd=password;
The fields are filled with respective information. I also tried putting my latop's name instead of localhost. I tried different port numbers with no use .
I got an error:
cn.ServerVersion threw and exception - InvalidOpertionException.(network related eroror) The next timem the error sayingthe connectionwas successful but there was a time during the pre-login handshake.
I'm using Visual Studio 2012 with SQL Server 2012. I also tried installingthe mysql connector net. My database was created with phpmyadmin web interface that uses the xampp control panel.
Any help please? I'm making an aspx webpage with c# as the code behind.
I tried adding these tags Integrated security and removing the user and password tags with no luck
How you connect the MySQL server (You mention SQL but later Mysql so hence I write this answer for Mysql).
Try to open services. Check if Mysql is running or not. Check if firewall make it hard to connect to the mysql services.
Try to remove database from connectionstring (that you pasted to connect). If that works it means you didn't have access to Database.
BTW this connectionstring is totally incorrect. "Server=localhost,49172;database=databasename;uid=user;pwd=password;"
Are you sure 49172 is the port you are using. Try to define port like this way https://www.connectionstrings.com/mysql/ to fix it.
If you didn't changed your port then by default it will be 3306.
I hope this will fix your issues.
I'm in the folowing scenario:
I have a local application in WPF C# and I want a centralized database on a server (Webhotel). Security is not a critical matter at this point and there will only be one or two instances of the client application. It's not my own server so I don't have control over the server settings. I do, however, have access to a SSH account on the webhotell. I Use VS2012.
My question is:
How do I connect to the MySql database and use it's data using "best practice" or any alternative. Upsides/downsides.
Also, if you do suggest using SSH, I whould realy appriciate code examples or links to tutorials.
I am developing c# windows application.
In that I want to connect to mysql database which resides in another system.
Please help me to solve this?
Assuming that you know how to connect to and query a database, you'll need the following:
The ADO.NET provider for MySQL
The hostname or IP address of the server
A user ID and password to connect with
Add a reference to the MySQL provider. From there, it works just like connecting to a SQL Server box, except the class names are a bit different and some minor SQL dialect is also different.
Of course, if you don't already know how to connect to a database, you'll need to start a bit slower. I'd recommend you Google yourself a basic data-access tutorial.
Good luck!