When do I use libmysql-6.1.dll vs libmysql.dll? - mysql

I'm using HeidiSQL to edit a MYSQL database, and it's asking which library I want to use for the edits:
libmysql-6.1.dll
libmysql.dll
How do I know which one to use?

These alternative libmysql*.dll and libmariadb*.dll libraries are there to solve (SSL) connectivity issues on newer MySQL and MariaDB servers. For example on MySQL 5.7, some users reported the following error with the older libmysql.dll:
ASN: bad other signature confirmation
Using libmariadb.dll may cause another error:
Unknown SSL error (0x80090308)
Especially when you provide a SSL certificate, you may run into such issues.
For this and any other connectivity issue, HeidiSQL provides alternative libraries the user can try. Apart from that, I never heard of any other advantage or disadvantage of one or another of these libraries.

While the question of which library to use for MariaDB seems pretty obvious (libmariadb.dll), what to make of the other two?
As a clue, I looked a the file properties.
libmysql.dll shows ProductVersion 5.6.6.0
libmysql-6.1.dll shows ProductVersion 6.1.11.0
Given that these files are included in HeidiSql v11.3, I concluded they are NOT generated by building HeidiSql. So, where did those version numbers come from?
Poking around in C:\Program Files\MySQL\MySQL Server 8.0\lib, I see a libmysql.dll there too (ProductVersion 8.0.25).
So, my guess is that HeidiSql acquired those files from builds of MySQL. And the newer one (libmysql-6.1.dll) is probably the better bet for current releases of MySQL.
That does leave open the question of where the number "6.1" came from. It doesn't appear there was ever a 6.1 release of MySQL?
And it also doesn't address which one is best for MSSQL, PostgreSQL, etc. But that wasn't the question here.

Related

An error happened while reading data from the provider: A call to SSPI failed, see inner exception

Grr - I hate upgrades that break things
I have upgrade MySql Connector/Net to 8.0.31 from I think it was 8.0.28. And also the ODBC (both 32 and 64 bit) to same.
I think this has broken my Excel Power Query connectors which connect a spreadsheet to a database as I'm getting the title error message. Having similar issues with Power BI connectors as well.
I can't trace the inner exception as there is no ability with Excel / Power Query to do this unless I missing something. Other answers talk about this being security stuff but I have no way of changing/altering this.
Even more frustrating is that this message appears on some of my databases but not all.
The underlying MySql database is very old at 5.6.10 (and I have no way of upgrading this)
I'd downgrade back to 8.0.28 (at least it worked) but I'm not sure how feasible of otherwise that is. I get the impression
I can happily query via a SQL tool (e.g. dbeaver or MySQL Workbench) so this is something else.
Any ideas on what I can do to fix this?
Thanks
EDIT:
So I downgrade MySQL Connector t0 8.0.28 (by using Windows Programs and uninstall the various MySQL 'upgraded' component so that downgrade to versions I wanted)
Still had the error. It is very much a security issue and disabling encrypted connection has fixed most of it.
Like to know why this happened as not happy exposing more than I want too.
Phew.
My workaround is to use an odbc connection string.
you'll need the MySQL ODBC driver instead of the .NET that cause the issue.
Download here: https://dev.mysql.com/downloads/file/?id=513647
In powerBI go to 'Get data' and select more. On the bottom of the list of sources is the 'Other' option and about half way is the ODBC.
In case you need an example: https://www.connectionstrings.com/mysql-connector-odbc-5-2/

unable to create connection to mysql from C++Builder

I have C++Builder Community Edition. I am trying to create a connection from a blank project to mysql server. When I do a test, after supplying the right username and password, I get this error message:
Error: [FireDAC][Phys][MySQL]-314. Cannot load vendor library [libmysql.dll, libmariadb or libmysqld.dll]. The specified module could not be found
I was under the impression that one of the selling points of C++Builder is how easy to create a Windows form for database programming?
It is Relatively easy! However you do need to read the docs and understand how FireDac works with C++ Builder/Delphi. One big consideration is the correct bitness of your executable, x86/x64, and which client libs you have on your machine?
If it is x86 then you can use the FireDAC Explorer from within the IDE to get connected, if you have set up the connection definitions correctly and, as Spektre wrote, have MySQL running locally, it will connect? The community version only supports local connections.
Specifically you need to ensure that the MySQL connection definition or string contains all the needed entries. If you're using Windows look in the file located at C:\Users\Public\Documents\Embarcadero\Studio\FireDAC\FDConnectionDefs.ini and make sure it is setup with the proper information.
Read the docs to see how FireDAC uses connection definition files and/or strings. It does take a little effort to get it all working together so you have to be willing to learn it! If after doing some of this, post again with what you've found and be specific and you may find people be willing to help you more.
Embarcadero FireDAC Docs

Jira clean install "You have specified a database that is not empty"

I'm installing Jira locally with the latest version (7.13 x64 version).
When doing the custom install and trying to switch to using MySQL as the database,
I get the error:
You have specified a database that is not empty, please specify an empty database.
The database is brand new, I literally just created it and if I query it I can see it has no tables created.
I created the database (and several others) using either the standard CREATE DATABASE ... or be specifying UTF-8 as well, which is how the Atlassisn docs suggest it is done.
But, no matter what I do, the same error keeps appearing. Topics on the Atlassian site mentioning this error haven't been any help and all seem to do with version conflicts which aren't relevant here.
I have installed the Java/MySQL connector version 8.0.13. Is it something to do with that?
Thanks in advance.
It was the JDBC connector that was the problem. I downloaded and installed the latest (version 8.0.13) but it was causing the error.
Installing version 5.1.47 works just fine, even though it isn't recommended for use with MySQL 5.6, which I'm using.
But, using that connector, I have a database installed and Jira is functioning as it should.
I know is so late for answer but say answer to other searcher this question
I found this error in the logs which lead me to https://jira.atlassian.com/browse/JRASERVER-67274
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
The long and short of it is you need an older mysql-connector-java-5.1.x.jar driver instead of the latest mysql-connector-java-8.0.x.jar that the documentation would lead you to install.
Reverting my driver to mysql-connector-java-5.1.49.jar fixed the issue for me.

how to find the connection string details for mysql in IIS?

I installed php and mysql on my IIS 7,
Now, I can see the phpinfo() and it all works great, except, I dont know where and what are the connection string details are for mysql.
I am trying to install wordpress (via web platform installer on IIS) and everytime I try to install it, it asks for database details - I understand why its doing that, except, I dont know what they are myself.
After a lot of googling and searching, I am surprised that there are literally NO information on how to do this, no tutorials anywhere, not even bugs on this. Either that, or I'm barking up a different solar system.
Any links to tutorials on how to do this would be very helpful. But most importantly, how do I find the details about mysql?
thanks.
Do yourself a favor and download a proper GUI for working with MySQL, such as SQLYog or something similar and forget that poo of PHPMyAdmin. As mentioned, your username is most likely root without password.
You can search for a program called mysqlinstanceconfig.exe (or something similar, you should have it in your MySQL installation folder) - it allows you to quickly reconfigure your instance and you can reset your login credidentials with it.
About MySQL GUI-s: if I'm not mistaken, there's one free coming directly from MySQL but I'm not sure about that. Forget about PHPMyAdmin, it's the worst piece of code ever written and a HUGE security hole.
As you're running a MySQL server locally, your hostname would be localhost, and you can use root as the username, and put nothing as the password.

Has anyone successfully connected to MySQL from Ruby?

I'm starting to get a bit desperate in my attempts to get a ruby script to connect to MySQL.
I've given up on DBI, as I just don't seem to be able to get it to work no matter what I do. I figured I might have more luck with just using mysql.rb from ruby-mysql. However, in using that I get the following error:
./mysql.rb:453:in `read': Client does not support authentication protocol requested by server; consider upgrading MySQL client (Mysql::Error)
I gather from googling that error message that this means my version of MySQL is too recent and doesn't support old-style passwords. I'm on a shared server and don't have root access, so I can't make the changes recommended to the MySQL config.
My version, btw, is:
mysql Ver 14.7 Distrib 4.1.22, for pc-linux-gnu (i686) using readline 4.3
Has anyone succeeded in getting ruby to connect to MySQL? I've been trying under Windows, since I have admin access on my Windows machine, but if there's a way to do it without root access on Linux, that'd be even better.
Sounds like you've run in to a MySQL quirk. Some time around version 5.0 they changed the format of connect passwords. It's an easy fix, though: http://dev.mysql.com/doc/refman/5.1/en/old-client.html
(Also, check out the Ruby Sequel gem, it lets you do some real fun stuff with all sorts of databases and without the overhead of ActiveRecord: http://sequel.rubyforge.org/documentation.html )
There is a good summary of how to do this here: http://rubylearning.com/satishtalim/ruby_activerecord_and_mysql.html
I haven't had any issues with connecting to MySQL from Ruby on my test machines.
You mention that you're using a shared hosting provider. If they have that old of a ruby-mysql version that it's not compatible with the new style passwords, perhaps their support staff can make the changes you need made to the user row(s) in MySQL.
What are you looking to do? I think it is possible to use the ActiveRecord component of Rails to establish a connection to MySQL. I'll see if i can find some documentation to back this up, and i'll update this answer.
link to ActiveRecord/MySQL integration
Update: to use ActiveRecord for the purpose are looking for, you will need to create the various model classes that represent the tables you are pulling data from, and specify their relationships. Once that is done, you will be able to do something like:
SomeModel.find(:all, :conditions => ['some_column = ?', some_value]
I've used this approach in the past to provide my Rails apps with access to WordPress data.
It may be that you're using an older version of mysql and need to upgrade it.