[Lazarus] can't connect to Mysql database using TMysql57connection

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] can't connect to Mysql database using TMysql57connection

Free Pascal - Lazarus mailing list
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


Web Server 
  • Apache
  • Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
  • PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
  • PHP version: 7.1.17


Database Server 
  • Server: Localhost via UNIX socket
  • Server type: MySQL
  • Server connection: SSL is not being used Documentation
  • Server version: 5.7.22 - MySQL Community Server (GPL)
  • Protocol version: 10
  • User: root@localhost
  • Server charset: UTF-8 Unicode (utf8) 

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] can't connect to Mysql database using TMysql57connection

Free Pascal - Lazarus mailing list
> Project Moneyproject raised exception class 'ESQLDatabaseError ' with
message
> 'Server Connect Failed'.

Check installed libmysql client version.



--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] can't connect to Mysql database using TMysql57connection

Free Pascal - Lazarus mailing list


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
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] can't connect to Mysql database using TMysql57connection

Free Pascal - Lazarus mailing list
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 <[hidden email]> 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
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus


--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] can't connect to Mysql database using TMysql57connection

Free Pascal - Lazarus mailing list


On Tue, 5 Jun 2018, Larry Dalton via Lazarus wrote:

> 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.

>
>
> On Tue, Jun 5, 2018 at 1:55 AM, Michael Van Canneyt via Lazarus <
> [hidden email]> 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
>> [hidden email]
>> https://lists.lazarus-ide.org/listinfo/lazarus
>>
>
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] can't connect to Mysql database using TMysql57connection

Free Pascal - Lazarus mailing list
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 <[hidden email]>
Date: 6/5/18 07:02 (GMT-05:00)
To: Larry Dalton via Lazarus <[hidden email]>
Cc: Michael Van Canneyt <[hidden email]>
Subject: Re: [Lazarus] can't connect to Mysql database using TMysql57connection



On Tue, 5 Jun 2018, Larry Dalton via Lazarus wrote:

> 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.

>
>
> On Tue, Jun 5, 2018 at 1:55 AM, Michael Van Canneyt via Lazarus <
> [hidden email]> 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
>> [hidden email]
>> https://lists.lazarus-ide.org/listinfo/lazarus
>>
>
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus