Click here to Skip to main content
15,902,636 members
Everything / MySQL Connector

MySQL Connector

MySQL-Connector

Great Reads

by Sujith Karivelil
In Master - Slave replication, Changes in master will reflect in Slave. but any changes made in the slave Database will not reflect back in Master, this article will help you to implement Bidirectional Replication.
by zajo1969
InnoSetup script to download and install MySQL ODBC driver
by Lizandro Campbell
Using Visual C# 2008 to establish connection to a MySQL 5.1 database with MySQL Connector/NET 5.1.7
by rohit7209
Use AccessRemoteMySQLDB-API in your project to access web-server MySQL database

Latest Articles

by Silvia Campo
I’ve found it usually tricky to reference the right version of entity framework to the application’s .NET Core version.
by rohit7209
Use AccessRemoteMySQLDB-API in your project to access web-server MySQL database
by zajo1969
InnoSetup script to download and install MySQL ODBC driver
by Sujith Karivelil
In Master - Slave replication, Changes in master will reflect in Slave. but any changes made in the slave Database will not reflect back in Master, this article will help you to implement Bidirectional Replication.

All Articles

Sort by Score

MySQL Connector 

28 Jan 2015 by Sujith Karivelil
In Master - Slave replication, Changes in master will reflect in Slave. but any changes made in the slave Database will not reflect back in Master, this article will help you to implement Bidirectional Replication.
18 Nov 2015 by zajo1969
InnoSetup script to download and install MySQL ODBC driver
29 Apr 2014 by Sergey Alexandrovich Kryukov
Hugo E. wrote:when I try to test connection, display this messagge: Object reference not set to an instance of an object. I guess..cause it mysql.dll is not referenced.I don't think so; then you would not be able to compile and run your code.You did not tag your platform, but the error...
29 May 2015 by _Asif_
Seems like a homework. You can start from here MySQL : Multiple row as comma separated single row[^]
19 Jan 2020 by OriginalGriff
Try: SELECT [Name] FROM Data WHERE Model LIKE 'Keyword1%Keyword2' Do note that your regex example won't work at all unless all the names are in all lower case, and there is no separating character between "surname" and "lastname" - for your username, it would match "junglee" but not "jung lee",...
4 Apr 2014 by Maciej Los
Have you tried something similar to:SELECT FT.Calculation1, FT.Calculation2, FT.Calculation1 - FT.Calculation2 AS Calculation3FROM (( SELECT COUNT(foto.rate_changes.photographer_id) AS Calculation1 FROM foto.rate_changes WHERE foto.rate_changes.is_conversion = 1) AS t1 INNER...
29 Apr 2014 by Maciej Los
First of all, you need to install MySQL server[^]. Secondly, you need to install ADO.net connector[^].Finally, use proper ConnectionString[^].That's all!By The Way: If you any question to the author of an article, please use this: New Message[^]
7 Oct 2014 by Maciej Los
Please, read my comment to the question.Start here[^]
7 Oct 2014 by User 11060979
I don't think that you will find a _really_free host for this. At least after traffic is above a "certain" Limit you Need to pay.Anyway if you read "free Hosting", read very carfully what you subscribe.
17 Dec 2014 by suthar parth
Select * from tables where CREATE_TIME > "2008-02-01" and CREATE_TIME
17 Dec 2014 by Chubby Ninja
Something likeSELECT *FROM `table`WHERE `table_date` BETWEEN CAST('2014-12-20' AS DATE) AND CAST('2014-12-25' AS DATE);Here's some links for Reference:MySQL BETWEEN comparison [^]MySQL CAST as [^]
28 Dec 2014 by Mehdi Gholam
There is nothing in .net 2 which is not in .net 4.5 so if you have the project file just upgrade the project to v4.5..net v4.5 can load and work with .net 2 DLL files without a problem so you really don't need to recompile.
28 Dec 2014 by Maciej Los
As George Jansson[^] mentioned, there is no option to use MySql .net connector[^] without referencing to the proper dll.See this: Connect C# to MySQL[^] and this: Connecting to a MySQL Database in C#[^]
31 Jan 2015 by Sergey Alexandrovich Kryukov
Most likely, ConnectionStrings("log") returns null and then you try to dereference this null object by taking its property value ConnectionString, which throws this exception. It's really important to learn how to debug such simple problems all by yourself. You cannot ask questions every time it...
9 Jun 2015 by CHill60
Problem is in the line Dim cont As Mysqlconnnection Clue is in the first error message Quote:Value of type 'MySql.Data.MySqlClient.MySqlConnection' cannot be converted to 'codeprojects.Mysqlconnnection'Note the case of the letters. Use Dim cont As MySqlConnectionAll of the other errors (as...
26 Jun 2015 by Abhinav S
You should not check if a password exists in the system.Only check for the password if you know if a user exists!
4 Aug 2015 by Praveen Kumar Upadhyay
Even though it is very basic query that you can search out on google, but to solve your problem below is the query that you need.select name,sum(ratings) from table_name group by name
1 Sep 2015 by CHill60
Either ask the site admin e.g. in sugs&bugs[^]Or just copy the information into a new question
1 Sep 2015 by KarstenK
Your question lacks of code and "answerability" so the closing is fine. External links are not good because the content may change or be dangerous.And the content of your question is showing that you have to ask somewhere else. Maybe the coders at github.And I dont wanna judge this...
25 Dec 2015 by Mehdi Gholam
When using MYSQL the delimiter character for table/column names is not [ ] but ` i.e:INSERT INTO `liteusers` ...
13 Jul 2016 by ZurdoDev
As mentioned in the comments, I would suggest that you specify your columns that you are inserting into. This may not be exact syntax for MySql but in MSSql it works:INSERT INTO table_a (col1, col2, col3)SELECT table_b.col1, @Last_ID, table_b.col2FROM table_bWHERE...
2 Aug 2017 by Jochen Arndt
You have to link your DLL with the MySQL library. This can be done in the project settings or using a #pragma comment (lib, "filename") statement (see comment (C-C++)[^]). That should solve the unresolved external symbol linker errors. You should also read Walkthrough: Creating and Using a...
23 Aug 2017 by Bernhard Hiller
You use MySQL, not Microsoft SQL Server. Consequently, those square brackets cannot be used for escaping field names. In MySQL, you use backticks ` instead. But anyway, you do not need to escape the field name here, it is not a reserved word nor does it contain spaces. MySqlCommand cmd = new...
19 Jul 2018 by Jochen Arndt
See PHP: mysql_connect - Manual[^]: Quote: Warning This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: Choosing an API[^] and related FAQ[^] for more information. Alternatives to this function...
5 Nov 2019 by OriginalGriff
Read the error message: timeout period elapsed prior to completion of the operation or the server is not responding. At a guess, the server is not responding. Check your connection string, make sure that it works - the chances are that the IP address you are using is not available from that...
22 Mar 2020 by phil.o
Image data type is binary content. JSON, on the other hand, is text-based. The simplest solution would be to encode the binary content as Base64 strings on the mongodb side, and then decode the Base64 strings back into byte arrays on the MySQL...
26 Mar 2020 by phil.o
Please respect the INSERT command syntax: MySQL :: MySQL 8.0 Reference Manual :: 13.2.6 INSERT Statement[^] - You did not provide the list of columns to insert - There is no SET keyword in INSERT statement - You did no use the VALUES clause ...
27 Mar 2020 by Richard Deeming
Don't do it like that! Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query. PHP: SQL Injection - Manual[^] As to your error message, it indicates that you're...
3 Feb 2021 by CPallini
Looks a MySQL bug: MySQL Bugs: #61878: error: conflicting declaration 'typedef char int***_t'[^]. You my try to get a more updated version of it (hoping they've fixed the bug) or manually redefine one typedef in order to overcome the problem.
8 Jul 2021 by Richard Deeming
Quote: params = (crsVar.get(), sbVar.get(), yrsVar.get(), smVar.get(), nVar.get(), rollVar, genVar.get(), dVar.get(), eVar.get(), mobVar.get(), adVar.get(), rdVar.get()) ) Based on the variable name and the surrounding...
22 Apr 2022 by OriginalGriff
That is exactly what is expected to happen: SQL does not "look" at past values when assigning a new ID value because previous values are "used" and could potentially have other data which was related to that ID (though not in a formal FOREIGN KEY...
23 Dec 2023 by OriginalGriff
DBNull is a special type: it represents an "empty value" in database nullable column. When you issue a SELECT request against the database any matching rows that contain an SQL NULL value is returned as an instance of the DBNull Class[^] ...
27 Mar 2014 by Asad CR
sir we have server computer in my server room with mysql installed. i have a vb.net application which can connect to database in mysql.the problem is it works when mysql and vb are on same computersIn same network both on different computers there's a error"unable to connect to any...
10 Apr 2014 by Mohd Wasif
Hi All, I have to make connectionstring in C# winform config file.in that I have server name="abc"userid=rootand there is no password .Please suggest.
10 Apr 2014 by Paulo Augusto Kunzel
I've pasted the code from how to do this that is available at the msdn page. For further reference have a look at the link at the bottom. Change the returning string at GetConnectionString() or replace it all together with a simple string. It's up to you and the situation you are...
24 Apr 2014 by rafiq2222 rafiq
**i am using mysql and php**table : ID: auto inc NO: int name: varchare date: dateNow here my ID is auto incremented which is starting from 1 and increments to ....here the idea is the column (**NO**) i need to set it to be generated from 1 and...
27 Apr 2014 by MacJet
when i am running group_concat in mysql on remote server through url its not working but when am running it locally its working fine .
29 Apr 2014 by DamithSL
you can install mysql.data using NuGet package manager...
25 May 2014 by Neha Mukesh
MenuItem mnItem; var menuObjects = (from m in context.MenuObjects join r in context.UserRights on m.ID equals r.MenuObjectID where m.ParentMenuObjectID == parentID && r.RoleID == roleID && ...
25 May 2014 by Member 4686590
Hi,I have an apache server (version Apache/2.2.15) configured to use python script. The script is supposed to connect to database and inserts data to table. I have written a simple code as below:import MySQLdb as mdbdb = mdb.connect(host="mysql", user="one", passwd="two",...
13 Jun 2014 by QuantumPlumber
Port number? I was able to reproduce this error message on my setup by setting an incorrect port number for the database connection. An incorrect host address also produces it.
10 Jul 2014 by Bernhard Hiller
"update grn_items set uid=1;" and"yes... on update trigger "=> see it? The problem is caused by your trigger (and maybe further nested therein).
10 Jul 2014 by Chinna Suresh
i have a web application that will store data into mysql database. And the thing is i cant change web app to store its data into sql.but i need to achieve that.whenever website writes data into mysql that should be written in MSSQl as well. Can i do this?IS there any way to achieve...
11 Jul 2014 by OriginalGriff
There is no way I know of to do this automatically - you will have to code it yourself.
13 Jul 2014 by Muhammad Taqi Hassan Bukhari
I am developing a website in php with mysql database online. I normally created table using SQL Script because in future if i have to create again or update, then its easy for me. I want to know that is there any way in MySQL phpMyAdmin to save my all executed query where i can see all.
13 Jul 2014 by Peter Leow
In phpMyAdmin version 4.1.6, when you write your sql script under the SQL tab, you can bookmark it with a name, so that you can retrieve it later on for re-run. Of course, you can also choose to export it.
13 Jul 2014 by PHP2 i2i Vision
Hy , i'm still new user for WooCommerce , but i have "Jigoshop" plugin i used it before , and i know that there is extension that can help me to convert data from Jigoshop to Woocommerce and i need to konw if i do that migration does SEO data by yoast will also converted ?
15 Jul 2014 by _Asif_
Check the link MySQL Stored Function[^]
15 Jul 2014 by Tino Fourie
Is there any way that one can "hide" the login credentials when making a connection to a MySQL database.I know how to connect using: "database=;server=;User Id=;Pwd="Since the information gets hard coded in my case, I was wondering if there was any...
23 Jul 2014 by PHP2 i2i Vision
I PUT PHP code on my functions.php page if( get_option( 'first_time_45' ) ) {} else{global $wpdb;// Query over posts with type product and put the on an Object$results = $wpdb->get_results( 'SELECT id FROM wp_posts WHERE post_type LIKE "product" ', OBJECT );//get every...
19 Aug 2014 by Vishnu Vardhanan.H
DELIMITER $$CREATE PROCEDURE `cms`.`SetRegistration`() in p_EnquiryID int, in p_Date datetime, in p_ProjectTopic varchar(100), in p_Staff varchar(30), in p_TotalFess int, in p_Fees int, In p_Description varchar(250), in p_IsActive boolean, in p_BranchStatus...
19 Aug 2014 by Maciej Los
INSERT INTO tblregistration(Enquiry_ID,Date,ProjectTopic,Staff,Fees_ID,Description,Status,BatchStatus)values(p_EnquiryID,p_Date,p_ProjectTopic,p_Staff,p_TotalFess,p_Fees,p_Description,p_IsActive,p_BranchStatus);p_TotalFees is redundant.
25 Aug 2014 by Member 10703566
HI this is my php/mysql table
11 Sep 2014 by Kandiya
How to convert SqlDBHelper class used for Sql server with MySql ?My SqlDBHelper class with Sql server is as follows:using System.Collections;using System.Data;using System.Data.SqlClient;using System.Runtime.Remoting;using System.Reflection;using...
13 Sep 2014 by Richard MacCutchan
Please do not post the same question in multiple forums; you already have an answer at http://www.codeproject.com/Messages/4902385/How-do-I-sort-the-table-like-the-sample.aspx[^].
16 Sep 2014 by abmanish71
HelloI am new in PHP and MySQLI am using xampp softwareI have a csv file which will update on every 30 minI have a test data base in MySQL I want to a php code or a process which automatically get the data from csv file and overwrite on test database in MySQLNote : If...
25 Sep 2014 by Chinna Suresh
Currently am working on a website which uses mysql server but when it reaches maximum connections it says too many mysql connections(error),for that manually i need to increase the connections from mysql command prompt.but i need to do that as an automation as in like if the connections reaches...
25 Sep 2014 by Mehdi Gholam
Start here : http://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html[^]
20 Oct 2014 by AdamASPGeek
Hi Mohsen,I would not recommend you to go with Free hosting, you can find many cheap hosting providers now.
21 Oct 2014 by Empir
How do I remove results from the first query, if they exist in a second query? I've looked over previous stackoverflow threads and still can't get it to work. My MySQL queries so far are below: SELECT roomL.CityCode, roomL.TableCode FROM (SELECT roomL.CityCode,...
22 Oct 2014 by Salman622
try this hope it will help youSELECT roomL.CityCode, roomL.TableCode FROM (SELECT roomL.CityCode, roomL.TableCode FROM roomL WHERE roomL.StatusEnum = 1 AND roomL.TableCode NOT IN (select stock.TableCode from stock) AND roomL.TimeSeen BETWEEN...
22 Oct 2014 by Blesson Mathew
SELECT RL.CityCode, RL.TableCode FROM (SELECT roomL.CityCode, roomL.TableCode FROM roomL WHERE roomL.StatusEnum = 1 AND roomL.TableCode NOT IN (select stock.TableCode from stock) AND roomL.TimeSeen BETWEEN 10/10/2014 AND Now()) RL WHERE...
10 Nov 2014 by Rajkumar_007
select purchasemaster.date as pdate,puchasetable.qty as pqty,puchasetable.wt as pwt from purchasemaster inner join puchasetable on purchasemaster.PM_id=puchasetable.PM_id where puchasetable.G_id=1 and purchasemaster.date BETWEEN '2014-10-01' and '2014-10-31' group by...
11 Nov 2014 by jaket-cp
If the query is returning data correctly, then you should be gettingthe sdate, sqty and swt records but with the pdate, pqty and pwt column headings.As the union takes the column names from the first select statement as pdate, pqty and pwt.What you could do to distinguish the...
13 Nov 2014 by Jörgen Andersson
Tough to answer as you haven't stated what the frontend is.But if you look at the settings you can do in the Web.Config file when using ASP.Net you might get an idea on what you can change. fileEncoding="utf-8" ...
1 Dec 2014 by vikaskallidantheyil
helloi am having two remote MySQL database servers ,one with 5.5 community edition and win2012 server OS on storage server and another with 5.1 community edition and winxp os on a p4 machine. for the both i have around 200+ users accessing data through winform applications.now we are...
1 Dec 2014 by Kornfeld Eliyahu Peter
You can create a script of exiting user on the old DB:select CONCAT_WS(' ', 'create user', '''', User, '''', 'identified by password', '''', Password, ''';')from mysql.userThan run that script on the new DB...http://dev.mysql.com/doc/refman/5.1/en/create-user.html[^]
3 Dec 2014 by TheRealSteveJudge
Hi,if you are using C#,TimeSpan class will help you!e.g.int seconds = 24524542;TimeSpan ts = TimeSpan.FromSeconds(seconds);Best regards,Stephan
6 Dec 2014 by Member 11291748
i used this coding>>>>>>>>>>>>>>>>>>>>>>.but not wokingprivate void rbt_Backup_Click(object sender, EventArgs e) { string constring = "server=localhost;user=root;pwd=qwerty;database=test;"; string file = "D:\\backup.sql"; using (MySqlConnection conn...
23 May 2016 by Krishna BSPL
We want filter data between two dates. when we execute query then it return outer range of data to selected dates.
28 Dec 2014 by Gianmarco V.
Hello, i have a project in .Net Framework 4.5, and i need to import the Mysql Connector Source code into this one.But there is a problem, the Mysql Connector framework is 2.0, and i got some errors by importing it in my project.I Specify that i won't use a dll.How can i fix...
28 Dec 2014 by Diya Ayesa
hii try to install xammp server and it is installed successfully but when i click on admin button it shows me error see image image1[^]it shows me errorimage2[^]what should i do any help please
28 Dec 2014 by DamithSL
it seems IIS running on port 80, you can stop iis[^] and try again
28 Dec 2014 by Peter Leow
Besides solution 1, you could consider changing the port for Apache permanently from 80 to say 8080 like this[^].Then, to launch phpmyadmin, add the new port number to the url like this: http://localhost:8080/phpmyadmin
29 Dec 2014 by Madhuri Gamane
in this function it gives me an Error Like MySQL Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE label1;DROP FUNCTION IF EXISTS ExtractInteger;CREATE FUNCTION ExtractInteger (...
6 Jan 2015 by Rajnish D mishra
hello i save my large formatted text in my DataBase using CheckEditor.when i retrieve this formatted text for display purpose using Lableit will not Display Text In Formatted.for Eg. AAAAAAAAAAAA. BBBBBBBBBBBB. CCCCCCCCCCCC.But I got This Type...
6 Jan 2015 by Tejas Vaishnav
Have you stored formatted text to your database, as per your example, i think you need to store your text in such manner AAAAAAAAAA.BBBBBBBBBBB.CCCCCCCCCCC. then it will display in formatted manner at the time or retrieval
15 Jan 2015 by Nel Quantum-Lithium Nitro Llarenas
can I store or connect data to mysql with wamp using mysql.data? without using odbc
9 Feb 2015 by anilkumar_pandya
Hello I have implement one application that contains some page of php and some page of asp.net. and i have deploy this app in iis server.Application is working fine with local data.but database does not connect with live database.how can connect with live database?connection string in php...
16 Feb 2015 by Elisa Yosephine
Hi all,I'm newbie in MySQL. I have problem in my project. I want to create report with Crystal Reports 9 and connect to MySQL.I use Windows 7 32 bit and I've installed MySQL ODBC 3.51 Driver. I've make DSN for mysql in System DSN. My Crystal Report has connect to the DSN.In my c# code,...
17 Feb 2015 by Elisa Yosephine
Hi all, I'm newbie in MySQL. I have problem in my project. I want to create report with Crystal Reports 9 and connect to MySQL.I use Windows 7 32 bit and I already installed MySQL ODBC 3.51 Driver. I've make DSN for mysql in System DSN. My Crystal Report has connect to the DSN. In my...
23 Feb 2015 by Member 10886187
Hello there, I'm developing a mobile application in c# connected to a mysql server for a portable application.Basically there are two MySQL servers, a main server and a mobile one. the app has to import information from the main server to the mobile one to allow the app to work offline,...
23 Feb 2015 by Sujith Karivelil
You can try Bidirectional Replication - in MySQL[^] between these two databases.
9 Mar 2015 by Be Fresh
Hello i want to write CSV file from mysql statment SELECT * FROM dim_warehouses INTO OUTFILE 'D:/LocalFileTest.csv'but the file has been written into server drive not local machine please i want to save the csv file on user's machine not on Remote Connection Thanks alot
10 Mar 2015 by ZurdoDev
The server has to have access to wherever you want to save it. So, you could map a drive from the server to the client or you'll need to manually copy it later or perhaps get a script to copy it.
23 Mar 2015 by Sergey Alexandrovich Kryukov
Sorry, this is not urgent at all — I've checked up my schedule. There is no such concept as "telling the code". The code is written, not told. So the answer is: please write the code.—SA
26 Mar 2015 by OriginalGriff
Answered only to remove from unanswered list.
1 Apr 2015 by priyadarshini tv
HiI have one small issue in mysql. I created a master-slave replication in mysql.Master and slave databases are hosted in two servers.I am using two client machines to connect with master and slave.My issue is like when am trying to update or insert master from client machine1 that...
4 Apr 2015 by nuke_infer
visual studio 2012 installed in win 7 64 bit version.but there is no compatible mysql connector. i have installed mysql 6.7.4 ,6.9 but in in data tool mysql not showing.any solution
6 Apr 2015 by praveeee
select * FROM docsearchprofile as dp Join docsearchaddress as da on da.`FK_DocSearchProfile` = dp.`ID_DocSearchProfile` and da.`Mode`='P' JOIN docsearchexperience as de on de.`FK_DocSearchProfile` = dp.`ID_DocSearchProfile` JOIN designation as d on d.id_designation =...
10 Apr 2015 by OriginalGriff
Try:SELECT * FROM MyTableWHERE CAST([date] as TIME) BETWEEN '01:00:00' AND '05:00:00'Didn't notice it was MySQl:SELECT * FROM MyTableWHERE TIME([date]) BETWEEN '01:00:00' AND '05:00:00'
10 Apr 2015 by Maciej Los
Try something like this:SELECT DateFieldFROM TableNameWHERE TIME(DateField) BETWEEN '01:00:00' AND '05:00:00'For further information, please see:...
4 May 2015 by ZurdoDev
There are a lot of resources here[^] on CP.
5 May 2015 by Member 10361041
I'm working with accounting pack in java and i wanna generate reports just using queries without java codes.I wrote a stored procedure to generate a result table using many data tables.it has 5 columns. name, date, credit, debit and balance.I wrote a query to fill data from other tables....
5 May 2015 by Anele 'Mashy' Mbanga
I have tried this based on the example in my comments...update people set balance = (select newbalance from (select (balance + debit) - credit as newbalance from people));I have assumed a people's table. I have used the example in my comments and it updates the table with 350; Please...
5 May 2015 by Member 10361041
I Found a solution. I could write a stored procedure for it!And also i added another primary key field named "id".CREATE PROCEDURE ManageCreditorBalance()BEGINdeclare a_id int;declare a_val double default 0;declare a_balance double default 0;declare done int default 0;declare...
5 May 2015 by Member 10361041
And I found another solution from codeproject friends help.This is it.select a.addedDateTime, a.credit, a.debit, a.balance from creditors a limit 1union allselect a.addedDateTime, a.credit, a.debit, b.balance + a.debit - a.credit as balancefrom creditors a inner join creditors...
7 May 2015 by Sergey Alexandrovich Kryukov
This is not about performance; this is about semantic. If your semantic is numeric, if you are going to use numerical operators or functions, use a numeric type. In other cases, use character.—SA
11 May 2015 by moloy
Why MySQL 5.3 ANSI ODBC DRIVER when its going to retrieve record from table that is very slow in 64BIt windows operating system?
13 May 2015 by Member 10322975
what is the visual studio.net 2010 mysql Connector/Net version?