Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all 1447 articles
Browse latest View live

Equivalent of aspnet_regsql.exe for mysql. (8 replies)

$
0
0
Hi,

I want to use mysql to store my role provider database. Is there an equivalent of aspnet_regsql.exe for mysql. If there is not then can i migrate aspnetdb created in sqlserver to mysql? will Mysql role provider work with the table migrated from sql server?

Thanks,
Pankaj

MySQL Connector/Net 6.6.3 Beta 2 has been released (2 replies)

$
0
0
MySQL Connector/Net 6.6.3, a new version of the all-managed .NET driver for MySQL has been released. This is the second of two beta releases intended to introduce users to the new features in the release.

This release is feature complete it should be stable enough for users to understand the new features and how we expect them to work. As is the case with all non-GA releases, it should not be used in any production
environment. It is appropriate for use with MySQL server versions 5.0-5.6.

It is now available in source and binary form from http://dev.mysql.com/downloads/connector/net/#downloads and mirror sites (note that not all mirror sites may be up to date at this point-if you
can't find this version on some mirror, please try again later or choose another download site.)

The 6.6 version of MySQL Connector/Net brings the following new features:

* Stored routine debugging
* Entity Framework 4.3 Code First support
* Pluggable authentication (now third parties can plug new authentications mechanisms into the driver).
* Full Visual Studio 2012 support: everything from Server Explorer to Intellisense& the Stored Routine debugger.

Stored Procedure Debugging
-------------------------------------------
We are very excited to introduce stored procedure debugging into our Visual Studio integration. It works in a very intuitive manner by simply clicking 'Debug Routine' from Server Explorer. You can debug
stored routines, functions& triggers. These release contains fixes specific of the debugger as well as other fixes specific of other areas of Connector/NET:

* Added feature to define initial values for InOut stored procedure arguments.
* Debugger: Fixed Visual Studio locked connection after debugging a routine.
* Fix for bug Cannot Create an Entity with a Key of Type String (MySQL bug #65289, Oracle bug #14540202).
* Fix for bug "CacheServerProperties can cause 'Packet too large' error". MySQL Bug #66578 Orabug #14593547.
* Fix for handling unnamed parameter in MySQLCommand. This fix allows the mysqlcommand to handle parameters without requiring naming (e.g. INSERT INTO Test (id,name) VALUES (?, ?) ) (MySQL Bug #66060, Oracle bug #14499549).
* Fixed end of line issue when debugging a routine.
* Added validation to avoid overwriting a routine backup file when it hasn't changed.
* Fixed inheritance on Entity Framework Code First scenarios. (MySql bug #63920 and Oracle bug #13582335).
* Fixed "Trying to customize column precision in Code First does not work" (MySql bug #65001, Oracle bug #14469048).
* Fixed bug ASP.NET Membership database fails on MySql database UTF32 (MySQL bug #65144, Oracle bug #14495292).
* Fix for MySqlCommand.LastInsertedId holding only 32 bit values (MySql bug #65452, Oracle bug #14171960).
* Fixed "Decimal type should have digits at right of decimal point", now default is 2, and user's changes in
EDM designer are recognized (MySql bug #65127, Oracle bug #14474342).
* Fix for NullReferenceException when saving an uninitialized row in Entity Framework (MySql bug #66066, Oracle bug #14479715).
* Fix for error when calling RoleProvider.RemoveUserFromRole(): causes an exception due to a wrong table being used (MySql bug #65805, Oracle bug #14405338).
* Fix for "Memory Leak on MySql.Data.MySqlClient.MySqlCommand", too many MemoryStream's instances created (MySql bug #65696, Oracle bug #14468204).
* Added ANTLR attribution notice (Oracle bug #14379162).
* Fix for debugger failing when having a routine with an if-elseif-else.
* Also the programming interface for authentication plugins has been redefined.


Some limitations remains, due to the current debugger architecture:

* Some MySQL functions cannot be debugged currently (get_lock, release_lock, begin, commit, rollback, set transaction level)..
* Only one debug session may be active on a given server.

The Debugger is feature complete at this point. We look forward to your
feedback.

Documentation
-------------------------------------
You can view current Connector/Net documentation
at http://dev.mysql.com/doc/refman/5.5/en/connector-net.html

You can find our team blog at http://blogs.oracle.com/MySQLOnWindows.
You can also post questions on our forums at http://forums.mysql.com/.

Enjoy and thanks for the support!

Entity framework unknown column bug (1 reply)

$
0
0
I have the following linq to entities query which throws an exception:
db.Forecasts
.Where(f => f.GeoNameID == point.ID)
.Where(x => EntityFunctions.AddMinutes(x.DateStamp, utcOffset) >= localTime)
.GroupBy(x => EntityFunctions.AddMinutes(x.DateStamp, utcOffset))
.Select(g => new
{
Date = g.Key,
MinTemperature = g.Select(x => x.Temperature).Min(),
MaxTemperature = g.Select(x => x.Temperature).Max(),
MinWindSpeed = g.Select(x => x.WindSpeed).Min(),
MaxWindSpeed = g.Select(x => x.WindSpeed).Max(),
Conditions = g.Select(x => x.Condition)
});
while the same query without the 'Conditions = g.Select(x => x.Condition)' part works fine.
I read up on the 'Unknown column' issue and found out that it was a known Connector/Net bug in previous versions so I tried this with all the combinations of EF 5 and EF 4.3.1 along with Connector/Net 6.5.4 and the beta Connector/Net 6.6.3. The previous bug pointed to groupby with sum so it is a little different than my issue. Is this a bug or just lack of proper error handling from the connector's part (i.e. this shouldnt work but it should catch it during the generation of the query and not at the database level)?

mysql is using all memory (1 reply)

$
0
0
Hi,
The MYSQL is currently utilizing the whole of my RAM. How can I resolve it?
I am using the following version
+-------------------------+---------------------+
| Variable_name | Value |
+-------------------------+---------------------+
| protocol_version | 10 |
| version | 5.1.52-log |
| version_comment | Source distribution |
| version_compile_machine | x86_64 |
| version_compile_os | redhat-linux-gnu |
+-------------------------+---------------------+


The output of free command is as follows:


total used free shared buffers cached
Mem: 16331920 16117708 214212 0 125364 1519468
-/+ buffers/cache: 14472876 1859044
Swap: 32767992 85164 32682828


Also the output of the mysqltuner is as follows:


-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.52-log
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 1G (Tables: 8)
[--] Data in InnoDB tables: 52G (Tables: 23)
[!!] Total fragmented tables: 23

-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 5d 22h 16m 41s (28M q [56.477 qps], 545 conn, TX: 47B, RX: 50B)
[--] Reads / Writes: 33% / 67%
[--] Total buffers: 12.5G global + 168.4M per thread (250 max threads)
[!!] Maximum possible memory usage: 53.6G (344% of installed RAM)
[OK] Slow queries: 0% (2K/28M)
[OK] Highest usage of available connections: 42% (107/250)
[OK] Key buffer size / total MyISAM indexes: 256.0M/551.5M
[OK] Key buffer hit rate: 100.0% (67M cached / 333 reads)
[!!] Query cache efficiency: 0.0% (4 cached / 5M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 4 sorts)
[OK] Temporary tables created on disk: 0% (2K on disk / 413K total)
[OK] Thread cache hit rate: 68% (170 created / 545 connections)
[OK] Table cache hit rate: 62% (195 open / 312 opened)
[OK] Open file limit used: 10% (134/1K)
[OK] Table locks acquired immediately: 100% (16M immediate / 16M locks)
[!!] Connections aborted: 10%
[!!] InnoDB data size / buffer pool: 52.4G/12.0G

-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Reduce your overall MySQL memory footprint for system stability
Enable the slow query log to troubleshoot bad queries
Your applications are not closing MySQL connections properly
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_limit (> 8M, or use smaller result sets)
innodb_buffer_pool_size (>= 52G)


Kindly suggest any solution for this problem.

Thanks & Regards
Himanshu Joshi

VS 2012 and mySQL (-1 replies)

$
0
0
I am trying to use mySQL database with VS 2012 and Entity Framework. I am having problem mapping stored procedures. It does not map SPs. Any idea how to get it work?

Thanks

How to check if the database and tables exist through connector.NET (no replies)

$
0
0
New using mysql.

I want to check wether the database and the tables which are my program needed when the program starts. But I don't want to get a exception when I really inserting something into the tables when I know the table has not been actually setup.

Does anything support my idea?

Query is slow - always ~200ms (1 reply)

$
0
0
Hi !

I try to read some data from my database (5.5). And I used two variants:
DataReader and DataSet.

This is the code I used:
DataReader:
conn = new MySqlConnection(cs);
conn.Open();
string stm = "SELECT * FROM data1 ORDER BY ID DESC LIMIT 2";
MySqlCommand cmd = new MySqlCommand(stm, conn);
rdr = cmd.ExecuteReader();

DataSet:
string stm = "SELECT * FROM data1 ORDER BY ID DESC LIMIT 2";
conn = new MySqlConnection(cs);
conn.Open();
ds = new DataSet();
da = new MySqlDataAdapter(stm, conn);
da.Fill(ds, "data");

I measured the time for the Code parts above and I got this results:
1) DataReader
LIMIT = 2 ~ 226 ms
LIMIT = 2560 ~ 218 ms
2) DataSet

LIMIT = 2 ~ 204 ms
LIMIT = 2560 ~ 280 ms

The server is local running.

So why are there always ~200ms of time wasting?

Any help would appreciated.

Dominik

Buy Twitter Followers | Buy Bulk Twitter Followers (no replies)

$
0
0
Buy Twitter Followers | Buy Bulk Twitter Followers
For more details, please visit our web site :-http://buyfollowers.ca/

Do you need to show your presence of your twitter followers? Then there is
a solution for you. At buyfollowers.ca, we are commited to serve
you real twitter followers at very low prices. We are the only reliable and
#1 twitter followers resller company of the web market. This is because
some companies lead targeted followers, while other just blast requests to
an untargeted group of people. Business owners make the mistake of buying
twitter followers from lead-companies who offer untargeted marketing
assistance because they're lured by the numbers and the low rates.
Purchasing untargeted followers is cheaper and faster. Twitter not only
turns out to be a great place to share announcement and services even it
opens the door to considerable amount to expendanction of your business.
Twitter creates that chance for your business which surely become choice
for connecting real time with all over your Business group. On the other
side Twitter is quick and quite easy to navigate.

For more details, please visit our web site :
http://buyfollowers.ca/

VB2010 and LIKE statement (no replies)

$
0
0
Creating a datagrid view on a form in VB2010 and trying to use a "LIKE" statement in my query. I have tried every possible combination and no luck with an INTEGER type column.

I have another datagrid that works fine using ... LIKE CONCAT(@param1, '%') and that column in mysql is a varchar type column. If I use the same format against my INTEGER type column, I get an error stating "Incorrect data type..."

Anyone know how to format my LIKE statement against an INTEGER type column in VB2010? I assume I may have to convert the text box input to an integer type first?!? Users will be searching against project numbers and want this to be an open search box so they can search by one digit...or the whole project number.

timeout using .Net MySql Provider (no replies)

$
0
0
I'm a SQL Server DBA that just inherited a MySql database. I have no previous experience with MySql.

I have a SQL Server SSIS package that connects to a MySql database using the .Net MySql Provider. I have the default command timeout set to 60 on the SSIS connection. However, the query is timing out after 30 seconds. i checked all MySql system variables for values of 30 to see what might be causing the timeout. i found the net_read_timeout set to 30 and the net_write_timeout set to 60. I have updated the net_read_timeout to 60 but I still get the timeout.

any ideas what might be causing the timeout?

thanks in advance.

uuid_short() for insert queries (no replies)

$
0
0
I've installed Entity Framework 5 and I am developing my website with Visual Studio 2012 and MySQL.

I've decided to use uuid_short() function as the primary key for some of my tables. I wanted to know how can I ue the uuid_short() function with Entity Framework when I insert a row in to the MySQL database?

Thanks

MySQL Connector/Net 6.6.4 RC1 has been released (no replies)

$
0
0
MySQL Connector/Net 6.6.4, a new version of the all-managed .NET driver
for MySQL has been released. This is the Release Candidate
intended to introduce users to the new features in the release. This
release is feature complete it should be stable enough for users to
understand the new features and how we expect them to work. As is the
case with all non-GA releases, it should not be used in any production
environment. It is appropriate for use with MySQL server versions 5.0-5.6

It is now available in source and binary form from
http://dev.mysql.com/downloads/connector/net/#downloads and mirror sites
(note that not all mirror sites may be up to date at this point-if you
can't find this version on some mirror, please try again later or choose
another download site.)

The 6.6 version of MySQL Connector/Net brings the following new features:

* Stored routine debugging
* Entity Framework 4.3 Code First support
* Pluggable authentication (now third parties can plug new
authentications mechanisms into the driver).
* Full Visual Studio 2012 support: everything from Server Explorer to
Intellisense& the Stored Routine debugger.


The following specific fixes are addressed in this version:
- Fixed Entity Framework + mysql connector/net in partial trust throws exceptions (MySql bug #65036, Oracle bug #14668820).
- Added support in Parser for Datetime and Time types with precision when using Server 5.6 (No bug Number).
- Fix for bug TIMESTAMP values are mistakenly represented as DateTime with Kind = Local (Mysql bug #66964, Oracle bug #14740705).

The release is available to download athttp://dev.mysql.com/downloads/connector/net/6.6.html

Documentation
-------------------------------------
You can view current Connector/Net documentation
at http://dev.mysql.com/doc/refman/5.5/en/connector-net.html
For specific topics:
Stored Routine Debugger:http://dev.mysql.com/doc/refman/5.5/en/connector-net-visual-studio-debugger.html
Authentication plugin:http://dev.mysql.com/doc/refman/5.5/en/connector-net-programming-authentication-user-plugin.html

You can find our team blog at http://blogs.oracle.com/MySQLOnWindows.
You can also post questions on our forums at http://forums.mysql.com/.

Enjoy and thanks for the support!

The MySqlParameterCollection only accepts non-null MySqlParameter type objects. (no replies)

$
0
0
Hi All,

I am trying to insert some value in my table with using Web Service on .net.

If I publish web site and host it IIS i get this error when i use web service.

The MySqlParameterCollection only accepts non-null MySqlParameter type objects.
Parameter name: value

If I build and debug my code there is non null parameter even I see values in my table. what is going on? i didnt understand anything. Is this related with IIS?

Please, I know I have not non-null value..All Values have their value!! So, Can Someone give me some idea?? What is happening here??

Watch Mighty Morphin' Power Rangers || Season 19, Episode 20 || 20-Oct-2012 Stream MegaVideo (no replies)

$
0
0
The show is just going simply awesome and the new episode of the show seems to be very much exciting and looks to be a good one.


watch now

Mighty Morphin' Power Rangers s19e20, Mighty Morphin' Power Rangers , Mighty Morphin' Power Rangers , Mighty Morphin' Power Rangers , Mighty Morphin' Power Rangers , Mighty Morphin' Power Rangers , Mighty Morphin' Power Rangers video, Mighty Morphin' Power Rangers youtube, Mighty Morphin' Power Rangers episode, Mighty Morphin' Power Rangers download, Mighty Morphin' Power Rangers seasons, Mighty Morphin' Power Rangers , Mighty Morphin' Power Rangers megavideo, Mighty Morphin' Power Rangers

@#@#%Watch The Mentalist S05E04 Stream Megavideo 21.10.12 (no replies)


Timeout...obtaining a connection from the pool (1 reply)

$
0
0
I have been having this issue for quite some time and it's driving me bonkers. I recently changed some configuration parameters on our MySQL database server to hopefully stop this from happening, and it did not help. Every once in a while when someone does something repeatedly (like Log in to school account, submit invoice, log out, log into different school account, submit invoice, logout, over and over), I will then get this error:

MySql.Data.MySqlClient.MySqlException: error connecting: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

The database is on an Ubuntu Linux server. The application is on a Windows Server 2003 server. I recently changed the database configuration:

innodb_additional_mem_pool_size=512M
innodb_log_buffer_size=8M
innodb_buffer_pool_size=256M
innodb_thread_concurrency=0

This is similar to settings I have on a Windows Server that is working perfectly.

To fix this problem, I have to recycle the memory pool in Windows IIS, then it works well for a while until someone does this again. Any ideas?

Thanks,
Jesse

Unexpected Error occurred in .NET Framework Data Provider for MYSQL. (no replies)

$
0
0
I want to experiment with using MYSQL and ASP.NET using Visual Studio 2005 Pro, but I can't get the Visual Studio Integration to work.

The latest version of the MYSQL Data Connector that seems to have Visual Studio 2005 Integration included is version 6.4.5. After I run the install and open up Visual Studio I get the following Error message while attempting to Add a new server connection in the Visual Studio Server Explorer:

"Unexpected Error occurred in .NET Framework Data Provider for MYSQL. Please contact the provider vendor to resolve the problem."

Needless to say this is a useless error message because it provides no helpful information about the nature of the problem. I can't add any connection using Server Explorer while the connector is installed.

The server that I would like to connect to is one located on my account with godaddy.com, but I will never get there unless I can correct the error that keeps me from using the data connector with Visual Studio.

Does anybody have an explanation of this problem or a method of resolving the issue? Your help would be greatly appreciated.

Entity Framework 4.3.1 Code based Migrations and Connector/Net 6.6 (no replies)

NetConnector Query Parameter with @ does not function as per document (1 reply)

$
0
0
Hi

I was trying to write a Query and pass a parameter. It works fine if I embed the criteria in the CommandText, if I use Parameter with @ indentifier it does not work.

'***** SERVER MySQL 5.0.67 -community-nt via TCP/IP
'**** NetConnector for Mysql Version 5.0.8.1

The actual code is

Dim cmd As MySqlCommand = X.getCommand


With cmd
.Connection.Open()

'***** This does not work
.CommandText = "SELECT * FROM tycoonlist WHERE Type=@Type;"
.Parameters.AddWithValue("@Type", "Individual")
.Parameters("@Type").Direction = ParameterDirection.Input

Dim rdr As MySqlDataReader = .ExecuteReader
'**** Return empty

Do While rdr.Read
Console.WriteLine(rdr.Item("UID"))
Loop
rdr.Close()
'**** This Works
.CommandText = "SELECT * FROM tycoonlist WHERE Type='Individual';"

rdr = .ExecuteReader
Do While rdr.Read
Console.WriteLine(rdr.Item("UID"))
Loop


.Connection.Close()
End With

Any ideas why and to make it work as per documentation?

Regards

Ravi

ConnectionString questions (no replies)

$
0
0
Hi guys, I got a few questions regarding connection strings.

Lets take this code as an example:

try {
strConnect = "";
dbConn = new MySqlConnection(strConnect);
dbConn.Open()
if (dbConn.State.ToString() != "Open")
{
MessageBox.Show("Could not open database connection");
return;
}
}
catch (Exception ex) {
MessageBox.Show(ex.Message);
}

Assume the following setup on server:
1) server is localhost
2) database name is test
3) root user with password 'password'

In each of the test cases below, NO exceptions were thrown and the connection state is "Open"

strConnect = "";
strConnect = "server=;uid=;pwd=;database=";
strConnect = "server=localhost;uid=;pwd=;database=";
strConnect = "server=127.0.0.1;uid=;pwd=;database=";
strConnect = "server=;uid=root;pwd=;database=";
strConnect = "server=;uid=;pwd=;database=test";


In each of the cases below, an exception is thrown

strConnect = "server=foobar;uid=;pwd=;database=";
strConnect = "server=localhost;uid=;pwd=;database=foobar";
strConnect = "server=;uid=;pwd=;database=mytest"
strConnect = "server=localhost;uid=root;pwd=;database=test";

Why isn't Open throwing exceptions when the connecton string isn't fully qualified? To me it doesn't make sense to have a valid open connection on empty connection strings, supplying just a IP address, giving just a valid username, etc.
Viewing all 1447 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>