I have some troubles to use Entity Framework 6 and MySQL. I use Visual Studio 2015 and Entity Framework6.
After I click finish button on this wizard window:
I get this error window:
Why do I get error above, and how can I fix it? I don't have a table named 'TableDetails'.
Entity Framework (version 6.1.3) and MySQL Server (5.7)
Open Services (services.msc) and restart MySQL57 service.
Execute the following commands in MySQL.
use <>;
set global optimizer_switch='derived_merge=OFF';
Update the .edmx.
I hope this will work for u.
Thanks CodeCaster I found solution in forum he referenced in comment above.
Use this command in MySQL command line client:
use <<database name>>;
set global optimizer_switch='derived_merge=off';
set optimizer_switch='derived_merge=off';
Related
I use NETBeans IDE. I want to use JDBC with MySQL. I have downloaded and installed mySQL 5.5 but I don't know how to use mySQL with NETBeans. How can I do that.
Here is a very good video tutorial form which you can eaisly learn that How to integrate mySQL with netbeans.Also see this for step by step (with pictures) integrationAnd to setup a mySQL server you need to see this
Take a look at the Netbeans documentation that demonstrates how to set up a connection to a MySQL database from the NetBeans IDE. Take a look at the the section: Configuring MySQL Server Properties
Please see the tutorial below:
https://netbeans.org/kb/docs/ide/mysql.html
#xxlali
click services under the window tab in the ide.
right click the database and click new connection
Add mysql in the driver
click 'Next'
type username and password and click test connection.
Finish once the connection is succeded.
I just set up CF10, win2008, IIS 7.5 with mysql 5.6. But we are getting this error:
Error Executing Database Query.
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 'OPTION SQL_SELECT_LIMIT=DEFAULT
This error is removed when I explicitly set "LIMIT" to the queries.
(Update from comments)
Here is an example:
<cfquery name="dds" datasource ="#Request.Datasource#">
SELECT *
FROM tblaccounts
LIMIT 100
</cfquery>
As far as my research shows, it's an incompatibility with the new version of mysql 5.6.
Borrowing some from the answers above with more detail:
We were having the same problem and it was fixed by updating the JDBC file. Since ColdFusion 10 only supports MySQL 5.0 and 5.1, you need to update the Connector as mentioned above.
To update the JDBC Connector on your Windows machine,
Obtain the .zip connector from the link provided above
Open the zip archive and locate the mysql-connector-java-5.1.23-bin.jar
Copy this .jar file to C:\ColdFusion10\cfusion\lib\
Open Services (Start > Control Panel [Optional] > Administrative Tools > Services)
Stop/Start the "ColdFusion 10 Application Server" service
To verify the new .jar is has been recognized by ColdFusion, login to your ColdFusion Administrator, click on "Settings Summary" under "Server Settings". Search for "mysql". You should see the .jar file listed under the "CF Server Java Class Path" section. There is no need to re-setup datasources. These changes should automatically apply.
From what I understand another option should be to update the JDBC driver to the latest MySQL JDBC Driver. You can find instructions on using the latest JDBC driver here: (though the instructions may be a bit old, it should still work pretty much the same way).
FYI ColdFusion 10 only supports MySQL 5.0 and 5.1.
Thanks much Clark - we just had the same issue with CF9
This actually applies to CF9 as well.
Step 3 is then: Copy this .jar file to C:\ColdFusion9\lib\
Step3a Rename the old driver mysql-connector-java-commercial-5.1.11-bin.jar.old
Otherwise drivers may conflict. (happened before)
After the update the bug seemed to be gone. :)
MySQL 5.6 is now supported in ColdFusion 10 update 11, details here: http://helpx.adobe.com/coldfusion/kb/coldfusion-10-update-11.html
MySQL deprecated SET OPTION a long time ago, see the docs, and it was removed in 5.6
You need to use SET without the OPTION statement,
SET SQL_SELECT_LIMIT = 100;
Will do what you want.
Be aware that this sets the default for a single connection. To ensure that your subsequent query uses the same connection wrap them in a <cftransaction>
<cftransaction>
<cfquery name="tmp" datasource ="#Request.Datasource#">
SET SQL_SELECT_LIMIT = 100;
</cfquery>
<cfquery name="dds" datasource ="#Request.Datasource#">
SELECT *
FROM tblaccounts;
</cfquery>
</cftransaction>
An alternative is to enable multiple queries for the datasource, but this is not recommended for security reasons.
I'm using latest version of MySQL ==> mysql-5.6.10-winx64.zip
Created the database and every thing is ok 'I think'
when I try to execute this simple command;
"select * from family"
I got this error :
Error code 1064, SQL state 42000: 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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at
line 1
I've spent much time searching for a solution but no solution was found :(
That looks like an error coming from a JDBC driver. When the JDBC driver initializes the connection, it sends several commands to the MySQL server, one of which is:
SET OPTION SQL_SELECT_LIMIT=DEFAULT
The problem is that the SET OPTION syntax has been deprecated for some time and is now no longer valid in MySQL 5.6. Here's a relevant bug conversation from MySQL's bug database:
Bug #66659: mysql 5.6.6m9 fails on OPTION SQL_SELECT_LIMIT=DEFAULT
Try upgrading your JDBC MySQL driver. The bug conversation lists some other options in case upgrading the driver is not an option.
I followed the instructions above and this worked for me!
Download latest jar file from here:
http://dev.mysql.com/downloads/mirror.php?id=412737
Unzip it
Copy jar file "mysql-connector-java-5.1.25-bin.jar"
to this folder: C:\Program Files\NetBeans 7.3\ide\modules\ext
In Netbeans IDE: Disconnect from database.
Click Services. Expand Drivers. Right-click on MySQL and press Customize.
Add latest driver
Remove previous driver.
Re-connect to dabatase within IDE.
I had the same problem few weeks back. Followed the following steps and it very much resolved the issue.
Copied the latest version (mysql-connector-java-5.1.23-bin) of the jar file to ..\NetBeans 7.3\ide\modules\ext. My earlier version of the driver was mysql-connector-java-5.1.18-bin.
Change the driver version within NetBeans IDE. In the IDE's Services window, expand Drivers -> right-click on MySQL (Connector/J driver) and select Customize. Remove the earlier driver and point it to the latest one (C:\Program Files (x86)\NetBeans 7.3\ide\modules\ext\mysql-connector-java-5.1.23-bin.jar). Click ok and restart IDE.
This should resolve the problem.
If the driver suggestion does not work, check your sql for unprintable characters. I just spent an hour troubleshooting this issue only to discover a hidden u+200b character at the end of my sql statement.
I got the same Error when i was dumping mysql table structure file in to DB. Mistake was putting the Syntax for dropping all table before but not checking their existence in the Database.
Issue was at " DROP TABLE usermgmt".
I removed that code of lines of dropping tables and it proceeded with out any error this time.
I prefixed the name of the table with the database name such as
select * from database_name.table_name;
and it worked perfectly, so most likely there's a name conflict.
I'm attempting to use the 'Read Database' operator in RapidMiner 5 to read an 'ExampleSet' from a Mysql database. I seem to establish a working connection with my db as I notice the Manage Database Connections window displays a 'Connection ok' message when prompted.
However when I attempt to run the 'Read Database' process I receive the following error
"Process failed:
Failed to lookup .javax.naming.NoInitialContextException:
Need to specify class name in environment or system property, or as an applet parameter,
or in an application resouce file:
java.naming.factory.initial"
I don't know how to interpret this error. Do I need to set an environmental variable?
Seems that my problem can be remedied by upgrading mysql. I had been version 5.0, but after upgrading to version 5.5, my problem went away. Details remain unknown.
Long time lurker, first time poster; hoping anyone can help me out.
Im using MySQL Workbench 5.2.41 to migrate a database from SQL Server to MySQL 5.0.8
The entire process goes smoothly: both SQL and MySQL connection Tests are good, the skemea and table create as expected, everything checks out until the 'Bulk Data Transfer' step. At that point I receive this error:
...
Migrating data...
wbcopytables.exe --odbc-source=DSN=SQL Server 11;DATABASE=;UID=sa --target=root#127.0.0.1:3306 --progress --passwords-from-stdin --thread-count=1 --table [GSAClosers_v2] [dbo].[AccountBase] `dbo` `AccountBase`
`dbo`.`AccountBase`:Copying 84 columns of 169530 rows from table [GSAClosers_v2].[dbo].[AccountBase]
ERROR: `dbo`.`AccountBase`:SQLGetData: HY009:10:[Microsoft][ODBC Driver Manager] Invalid argument value `dbo`.`AccountBase`:
Finished copying 0 rows in 0m00s
Copy helper has finished
...
For connectors I'm using Microsoft SQL Server / ODBC Data Source / DSN: SQL Server and for MySQL the IP and port(3306).
SQL Server 2012 Management Studio connects and all operations work as expected.
O, side not: both are on the same localhost machine.
If anyone can shed some light on this I would be forever indebted. Thanks in advance
From here:
[Microsoft][ODBC Driver Manager] Invalid argument value.
Regarding to the error message and code you provided, which seems is
database is invalid or cannot be accessed. That means either the
database does not exist or the user does not have permission to access
the database.
It turns out you need specify the instance after the server name, so
in the server name in the dialog box for creating the ODBC Data
Source, you must enter it as either: MyServer\SQLEXPRESS or
.\SQLEXPRESS
I think you may have a problem connecting to your database from wbcopytables.exe. Keep in mind that this is a separate tool so the fact that you can connect from the rest of the Migration Wizard doesn't imply that you will connect in wbcopytables.exe.
The thing that worries me the most is that your DSN has whitespace characters. This might be interpreted by the Windows terminal as independent command line parameters. One thing you can do is to edit your DSN name removing the whitespaces and try again.
You may also want to connect without a DSN by putting all your connection parameters explicitely as explained in my blog post: How-To: Guide to Database Migration from Microsoft SQL Server using MySQL Workbench.
And, by the way, since MySQL Workbench 5.2.42 is out you should go and get it. The Migration Wizard is pretty new so important bug fixes are likely launched in each recent Workbench release.
In either case I think you should file a bug with your issues with a detailed explanation about how to reproduce it, possible solutions, etc.
Hope this helps.
Ok, got it figured out: un-install java. install java 1.6, use MySQL Migration Tool. change all data types to varchar, ints and bits. run migrations....eat data.