Author Topic: MySQL version requirements?  (Read 3893 times)

Offline openbridge

  • Regular User
  • **
  • Posts: 46
    • View Profile
MySQL version requirements?
« on: January 07, 2016, 06:24:54 pm »
Are there any MySQL version requirements relating to mod_sql and Profited? For example, do not use any version older than MySQL 5.3?

Offline castaglia

  • Administrator
  • Support Hero
  • *****
  • Posts: 5415
    • View Profile
    • http://www.castaglia.org/
Re: MySQL version requirements?
« Reply #1 on: January 07, 2016, 08:58:36 pm »
As far as I know of, no.  ProFTPD has been working with MySQL for many years, over many versions...

Offline openbridge

  • Regular User
  • **
  • Posts: 46
    • View Profile
Re: MySQL version requirements?
« Reply #2 on: January 11, 2016, 09:45:24 pm »
Ok, wanted to verify there were no hard requirements. In testing we have been using MySQL 5.5.x or newer. One of our devs used 5.1 due to some python dependencies and users could not login.

We would see errors like this in the logs:

2016-01-07 17:49:43,025 mod_sql/4.3[1527]: exiting mysql cmd_open
2016-01-07 17:49:43,025 mod_sql/4.3[1527]: exiting mysql cmd_escapestring
2016-01-07 17:49:43,025 mod_sql/4.3[1527]: unrecoverable backend error
2016-01-07 17:49:43,026 mod_sql/4.3[1527]: error: '1115'
2016-01-07 17:49:43,026 mod_sql/4.3[1527]: message: 'Unknown character set: 'utf8mb4''
2016-01-07 17:49:43,026 mod_sql/4.3[1527]: entering mysql cmd_exit

I told him we needed to switch back to 5.5.x. With no other change on the ProFTPD config side switching to the newer MySQL version resolved our woes. I asked only because I was not aware of any version dependencies, but since we should be on the new version anyway I did not spend anymore time on this.

BTW, we are using the latest ProFTPD version from the master branch in GitHub

Offline castaglia

  • Administrator
  • Support Hero
  • *****
  • Posts: 5415
    • View Profile
    • http://www.castaglia.org/
Re: MySQL version requirements?
« Reply #3 on: January 12, 2016, 08:15:11 am »
That particular "utf8mb4" string was added because of:

  http://bugs.proftpd.org/show_bug.cgi?id=4191

See:

  https://github.com/proftpd/proftpd/commit/f32305283af998341b89dd2a06729a4f4e33d3fb

Note that the MySQL version checks, in mod_sql_mysql, are done based on the client library version; is it possible that you were running a newer MySQL client (5.5.x) against an older MySQL server (5.1.x), and it is that combination which led to that "unrecoverable error"?

Offline openbridge

  • Regular User
  • **
  • Posts: 46
    • View Profile
Re: MySQL version requirements?
« Reply #4 on: January 13, 2016, 07:49:46 pm »
That is completely possible that the Docker container had the new drivers against the older RDS instance

Offline castaglia

  • Administrator
  • Support Hero
  • *****
  • Posts: 5415
    • View Profile
    • http://www.castaglia.org/
Re: MySQL version requirements?
« Reply #5 on: January 13, 2016, 11:45:48 pm »
OK.  I'm now thinking that mod_sql_mysql should *try* to set the character set (as it is doing now), but not to treat the failure to set the character set as a fatal error.  I.e. to make it try "utf8mb4", and if it fails, keep going anyway.  That behavior would allow for working with situations like yours more easily, where the coordination of client and server versions can be...difficult.

Sound good?

Offline openbridge

  • Regular User
  • **
  • Posts: 46
    • View Profile
Re: MySQL version requirements?
« Reply #6 on: January 26, 2016, 11:30:19 pm »
OK.  I'm now thinking that mod_sql_mysql should *try* to set the character set (as it is doing now), but not to treat the failure to set the character set as a fatal error.  I.e. to make it try "utf8mb4", and if it fails, keep going anyway.  That behavior would allow for working with situations like yours more easily, where the coordination of client and server versions can be...difficult.

Sound good?

Yes, I think that makes a lot of sense.

Offline castaglia

  • Administrator
  • Support Hero
  • *****
  • Posts: 5415
    • View Profile
    • http://www.castaglia.org/

Offline digidax

  • New user
  • *
  • Posts: 9
    • View Profile
Re: MySQL version requirements?
« Reply #8 on: May 20, 2016, 08:06:08 am »
I have installed on Centos 7 from EPEL repo:

proftpd.x86_64                                                        1.3.5b-1.el7                                              @epel
proftpd-mysql.x86_64                                                  1.3.5b-1.el7                                              @epel

and have using LoadModule mod_sql_mysql.c in my config. Have now the same problem after update with the
Unknown character set: 'utf8mb4'
A rollback is not possible because the repo offers no archives. How can I fix it? Can I load mod_sql_mysql.c directly from a path of the filesystem?

best regards
Frank

Offline castaglia

  • Administrator
  • Support Hero
  • *****
  • Posts: 5415
    • View Profile
    • http://www.castaglia.org/
Re: MySQL version requirements?
« Reply #9 on: May 20, 2016, 06:39:47 pm »
Unfortunately you would need to patch the source code, and recompile.  Or wait until 1.3.5c is released.

Offline digidax

  • New user
  • *
  • Posts: 9
    • View Profile
Re: MySQL version requirements?
« Reply #10 on: May 22, 2016, 11:48:34 am »
Thanks castaglia,
for all guy's with the same problem, Paul has build this fix in his repo.
Thanks to castaglia and Paul for this very very fast reaction. Tested and works for me for authing against a 5.0 mysql server.

Paul's repo:
http://www.city-fan.org/ftp/contrib/misc/

best regards
Frank

 

sighted planning