Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-06

can't connect to Mysql database using TMysql57connection

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Larry Dalton

error code
Debugger Exception Notification
Project Moneyproject raised exception class 'ESQLDatabaseError ' with message
'Server Connect Failed'.

Lazarus version: lazarus-project_1.8.2-0_amd64.deb fpc_3.0.4-2_amd64.deb
fpc-src_3.0.4-2_amd64.deb

settings for TMysql57Connection named CreateConnectionz'

Charset blank
database name bankofamerica
Hostname blank
(also tried Hostname localhost)
KeepConnection
logevents set on default setting
loginprompt false
options []
Params blank
password is set and correct
port 0
role blank
SkipLibrary verson false
tag 0
transaction CreateTransaction
user root.

Help!

Operating system Linux Mint 17.2 Cinnamon

phpmyadmin

- Version information: 4.8.0.1, latest stable version: 4.8.1 <https://www.phpmyadmin.net/files/4.8.1/>

Web Server

- Apache
- Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
- PHP extension: mysqli[image: Documentation]
<http://127.0.0.1:8080/phpmyadmin/url.php?url=https%3A%2F%2Fsecure.php.net%2Fmanual%2Fen%2Fbook.mysqli.php> curl[image: Documentation]
<http://127.0.0.1:8080/phpmyadmin/url.php?url=https%3A%2F%2Fsecure.php.net%2Fmanual%2Fen%2Fbook.curl.php> mbstring[image: Documentation]
<http://127.0.0.1:8080/phpmyadmin/url.php?url=https%3A%2F%2Fsecure.php.net%2Fmanual%2Fen%2Fbook.mbstring.php>
- PHP version: 7.1.17

Database Server

- Server: Localhost via UNIX socket
- Server type: MySQL
- Server connection: SSL is not being used [image: Documentation] <http://127.0.0.1:8080/phpmyadmin/doc/html/setup.html#ssl>
- Server version: 5.7.22 - MySQL Community Server (GPL)
- Protocol version: 10
- User: root at localhost
- Server charset: UTF-8 Unicode (utf8)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180604/d8e06090/attachment.html>

Reply by email

Michael Van Canneyt
to leledumbo
leledumbo wrote 5 lines
> Project Moneyproject raised exception class 'ESQLDatabaseError ' with message > 'Server Connect Failed'. Check installed libmysql client version.

The error he gets is the error fpc raises when mysql_connect() fails. So I think it is something else.

However, to test this, Larry, can you please please test on the command line, on the machine where lazarus is running:

mysql

If you see:
Client does not support authentication protocol requested by server; consider upgrading MySQL client

then you'll know what to do

additionally, can you test what you get with:

mysql -u root -p yourpassword -D bankofamerica

Considering you are using a bitnami install, phpadmin may be configured with some extra parameters.

Michael.

Reply by email

Larry Dalton
to Michael Van Canneyt

running mysql in terminal gets ERROR 1045 (28000): Access denied for user 'larry'@'localhost' (using password: NO)

running mysql -u root Ricky2013 -D bankofamerica get ERROR 1698 (28000): Access denied for user 'root'@'localhost'

apparently it is using a different password? or case?

On Tue, Jun 5, 2018 at 1:55 AM, Michael Van Canneyt via Lazarus <

Show quoted text 45 lines
wrote: On Mon, 4 Jun 2018, leledumbo via Lazarus wrote: Project Moneyproject raised exception class 'ESQLDatabaseError ' with >> > message > >> 'Server Connect Failed'. >> > > Check installed libmysql client version. > The error he gets is the error fpc raises when mysql_connect() fails. So I think it is something else. However, to test this, Larry, can you please please test on the command line, on the machine where lazarus is running: mysql If you see: Client does not support authentication protocol requested by server; consider upgrading MySQL client then you'll know what to do additionally, can you test what you get with: mysql -u root -p yourpassword -D bankofamerica Considering you are using a bitnami install, phpadmin may be configured with some extra parameters. Michael. -- _______________________________________________ Lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180605/a8ff0be7/attachment.html>

Reply by email

Michael Van Canneyt
to Larry Dalton
Larry Dalton wrote 7 lines
running mysql in terminal gets ERROR 1045 (28000): Access denied for user 'larry'@'localhost' (using password: NO) running mysql -u root Ricky2013 -D bankofamerica get ERROR 1698 (28000): Access denied for user 'root'@'localhost' apparently it is using a different password? or case?

Could very well be. MySQL is case sensitive where you don't expect it, and case insensitive where you don't expect it either... :)

My conclusion - after all this - is that this is not a FPC error, but a configuration problem on your machine. How to debug this is described on:

https://dev.mysql.com/doc/refman/5.7/en/problems-connecting.html

What I can do from the FPC side is to attempt to get a more informative/detailed connection error code from the MYSQL server.

Michael.

Show quoted text 49 lines
On Tue, Jun 5, 2018 at 1:55 AM, Michael Van Canneyt via Lazarus < > wrote: > > > On Mon, 4 Jun 2018, leledumbo via Lazarus wrote: > > Project Moneyproject raised exception class 'ESQLDatabaseError ' with >>> >> message >> >>> 'Server Connect Failed'. >>> >> >> Check installed libmysql client version. >> > > The error he gets is the error fpc raises when mysql_connect() fails. > So I think it is something else. > > However, to test this, Larry, can you please please test on the command > line, on the machine where lazarus is running: > > mysql > > If you see: > Client does not support authentication protocol requested > by server; consider upgrading MySQL client > > then you'll know what to do > > additionally, can you test what you get with: > > mysql -u root -p yourpassword -D bankofamerica > > Considering you are using a bitnami install, phpadmin may be configured > with some extra parameters. > > Michael. > > -- > _______________________________________________ > Lazarus mailing list > > https://lists.lazarus-ide.org/listinfo/lazarus >

Reply by email

larrydalton71
to Michael Van Canneyt

Thanks for the help, both of you. After I corrected the mysql installation, it worked. To hook up the Mysql57connection, enter 127.0 0.1 as the hostname to access the UNIX socket.

Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: Michael Van Canneyt via Lazarus Date: 6/5/18 07:02 (GMT-05:00) To: Larry Dalton via Lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] can't connect to Mysql database using TMysql57connection

Larry Dalton wrote 7 lines
running mysql in terminal gets ERROR 1045 (28000): Access denied for user 'larry'@'localhost' (using password: NO) running mysql -u root Ricky2013 -D bankofamerica get ERROR 1698 (28000): Access denied for user 'root'@'localhost' apparently it is using a different password? or case?

Could very well be. MySQL is case sensitive where you don't expect it, and case insensitive where you don't expect it either... :)

My conclusion - after all this - is that this is not a FPC error, but a configuration problem on your machine. How to debug this is described on:

https://dev.mysql.com/doc/refman/5.7/en/problems-connecting.html

What I can do from the FPC side is to attempt to get a more informative/detailed connection error code from the MYSQL server.

Michael.

Show quoted text 49 lines
On Tue, Jun 5, 2018 at 1:55 AM, Michael Van Canneyt via Lazarus < > wrote: > > > On Mon, 4 Jun 2018, leledumbo via Lazarus wrote: > > Project Moneyproject raised exception class 'ESQLDatabaseError ' with >>> >> message >> >>> 'Server Connect Failed'. >>> >> >> Check installed libmysql client version. >> > > The error he gets is the error fpc raises when mysql_connect() fails. > So I think it is something else. > > However, to test this, Larry, can you please please test on the command > line, on the machine where lazarus is running: > > mysql > > If you see: > Client does not support authentication protocol requested > by server; consider upgrading MySQL client > > then you'll know what to do > > additionally, can you test what you get with: > > mysql -u root -p yourpassword -D bankofamerica > > Considering you are using a bitnami install, phpadmin may be configured > with some extra parameters. > > Michael. > > -- > _______________________________________________ > Lazarus mailing list > > https://lists.lazarus-ide.org/listinfo/lazarus >

Reply by email