Error to connect to database lazarus / 16-Databases ---------------------------------------------------------------------- Whillis · 2018-12-05 01:20 Im trying to connect a database i made in Mysql workbench to lazarus with zeoslib, but whenever i create a connection = true it gives me this error message: SQL Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client im a total beginner with this stuff and really dont know what to do now. ---------------------------------------------------------------------- mangakissa · 2018-12-05 07:13 Use the right client library of your mysql database. ---------------------------------------------------------------------- Whillis · 2018-12-05 09:57 Is it something i got to download or a property i have to change somewhere? ---------------------------------------------------------------------- Zvoni · 2018-12-05 10:47 Which MySQL-Server-Version? IIRC they changed the default-authentication from 5.7 to 8 ---------------------------------------------------------------------- Whillis · 2018-12-05 10:53 here it says MySQL server  Version:8.0.13 x64 just like workbench, but i dont know if the libraries are something apart from that. ---------------------------------------------------------------------- Zvoni · 2018-12-05 11:08 Quote from: Whillis on December 05, 2018, 11:53:14 amhere it says MySQL server  Version:8.0.13 x64 just like workbench, but i dont know if the libraries are something apart from that. And that's probably the Problem...... AFAIK, the TSQLConnection has not been updated to MySQL8 Anyone want to correct me? Looks like it: https://mysqlserverteam.com/upgrading-to-mysql-8-0-default- authentication-plugin-considerations/ ---------------------------------------------------------------------- Whillis · 2018-12-05 11:27 oh so i need an older version of mySQL to work ou with database connection? if so which one could be the most updated to be able to do that something around version 5.7? ---------------------------------------------------------------------- rvk · 2018-12-05 11:32 Quote from: Zvoni on December 05, 2018, 12:08:16 pmAFAIK, the TSQLConnection has not been updated to MySQL8 Anyone want to correct me? OP uses zeos so probably uses TZConnection. I haven't tested it myself but with the latest ZeosLib it should work. https://forum.lazarus.freepascal.org/index.php?topic=41855.0 @Whillis, what version of ZeosLib do you have? ---------------------------------------------------------------------- Whillis · 2018-12-05 11:40 ZeosLib 7.2.4 ---------------------------------------------------------------------- rvk · 2018-12-05 12:05 Quote from: Whillis on December 05, 2018, 12:40:00 pm ZeosLib 7.2.4 Which is the latest stable version. But it is from 2018-03-25. MySQL 8.0 standard became available on 2018-04-19 so it could be ZeosLib 7.2.4 doesn't have the latest changes in it. You might have better luck with a newer version. You could also try the following in Workbench: Code: [Select]ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; flush privileges;(where password is your password and root your user) ---------------------------------------------------------------------- Zvoni · 2018-12-05 14:01 Quick question: Does anybody know if MySQL8-Support will be included in FPC3.2.X or higher? I've looked at the source-code of mysqlconn.inc Code: [Select]const   Mysql_Option_Names : array[mysql_option] of string = ('MYSQL_OPT_CONNECT_TIMEOUT','MYSQL_OPT_COMPRESS',      'MYSQL_OPT_NAMED_PIPE','MYSQL_INIT_COMMAND',      'MYSQL_READ_DEFAULT_FILE','MYSQL_READ_DEFAULT_GROUP',      'MYSQL_SET_CHARSET_DIR','MYSQL_SET_CHARSET_NAME',      'MYSQL_OPT_LOCAL_INFILE','MYSQL_OPT_PROTOCOL',      'MYSQL_SHARED_MEMORY_BASE_NAME','MYSQL_OPT_READ_TIMEOUT',      'MYSQL_OPT_WRITE_TIMEOUT','MYSQL_OPT_USE_RESULT',      'MYSQL_OPT_USE_REMOTE_CONNECTION','MYSQL_OPT_USE_EMBEDDED_CONNECT ION',      'MYSQL_OPT_GUESS_CONNECTION','MYSQL_SET_CLIENT_IP',      'MYSQL_SECURE_AUTH' {$IFDEF MYSQL50_UP}      ,'MYSQL_REPORT_DATA_TRUNCATION', 'MYSQL_OPT_RECONNECT' {$IFDEF mysql51_UP}      ,'MYSQL_OPT_SSL_VERIFY_SERVER_CERT' {$IFDEF mysql55_UP}      ,'MYSQL_PLUGIN_DIR', 'MYSQL_DEFAULT_AUTH' {$IFDEF MYSQL56_UP}      ,'MYSQL_OPT_BIND'      ,'MYSQL_OPT_SSL_KEY', 'MYSQL_OPT_SSL_CERT', 'MYSQL_OPT_SSL_CA', 'MYSQL_OPT_SSL_CAPATH', 'MYSQL_OPT_SSL_CIPHER', 'MYSQL_OPT_SSL_CRL', 'MYSQL_OPT_SSL_CRLPATH'      ,'MYSQL_OPT_CONNECT_ATTR_RESET', 'MYSQL_OPT_CONNECT_ATTR_ADD', 'MYSQL_OPT_CONNECT_ATTR_DELETE'      ,'MYSQL_SERVER_PUBLIC_KEY'      ,'MYSQL_ENABLE_CLEARTEXT_PLUGIN'      ,'MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS' {$IFDEF MYSQL57_UP}      ,'MYSQL_OPT_SSL_ENFORCE' {$ENDIF} {$ENDIF} {$ENDIF} {$ENDIF} {$ENDIF}      );Is it going to be updated according to https://dev.mysql.com/doc/refman/8.0/en/mysql-options.html MYSQL_OPT_GET_SERVER_PUBLIC_KEY is missing right now (didn't check the rest). And yes: I#m aware that it's not only the Const that has to be changed/updated, probably also the Open-Method and what not ---------------------------------------------------------------------- young_nandy · 2018-12-05 23:57 this means the zeoslib version does not support mysql. it's better to install the odbc for mysql driver. it's free ---------------------------------------------------------------------- Whillis · 2018-12-06 00:59 Ok late reply. But i got to fix it, and was very simple, instead of using mysql 5 as protocol i've put mariaDB-10 which worked out just right with libmariaDb! Thank you all!