Sign in Join

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

Mailing lists / lazarus / 2018-05

TMysql57Connection won't connect to localhost

13 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Larry Dalton

I am running lazarus 1.8.2 on linux mnt 17.2.
I am trying to access a mysql database that was installed with Bitnami.

- 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)
- Server: Server: localhost:3307
<http://127.0.0.1:8080/phpmyadmin/index.php>
- Protocol version: 10
- User: root at localhost
- Server charset: UTF-8 Unicode (utf8)

- 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

- Phpmyadmin Version information: 4.8.0.1, latest stable version: 4.8.1 <https://www.phpmyadmin.net/files/4.8.1/>
- Web Address http://127.0.0.1:8080/phpmyadmin/

I am using localhost as hostname on Tmysql57Connection.

I cannot connect the Tmysql57Connection to localhost. Help?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180528/53ecd2f7/attachment.html>

Reply by email

Michael Van Canneyt
to Larry Dalton

What is the error you are getting ?

If you want to connect through unix socket, you should leave hostname empty. If you set it to localhost, TCP/IP will be used.

Michael.

Larry Dalton wrote 37 lines
I am running lazarus 1.8.2 on linux mnt 17.2. I am trying to access a mysql database that was installed with Bitnami. - 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) - Server: Server: localhost:3307 <http://127.0.0.1:8080/phpmyadmin/index.php> - Protocol version: 10 - User: root at localhost - Server charset: UTF-8 Unicode (utf8) - 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 - Phpmyadmin Version information: 4.8.0.1, latest stable version: 4.8.1 <https://www.phpmyadmin.net/files/4.8.1/> - Web Address http://127.0.0.1:8080/phpmyadmin/ I am using localhost as hostname on Tmysql57Connection. I cannot connect the Tmysql57Connection to localhost. Help?

Reply by email

Landmesser John
to Larry Dalton: I am running lazarus 1.8.2 on linux mnt 17.2. I am trying to access a mysql database that…

try Zeoslib,  i use it for an Oracle Connection, but they have allso MySQL

https://sourceforge.net/projects/zeoslib/

they even handle german Umlauts correct :-)

Larry Dalton wrote 38 lines
I am running lazarus 1.8.2 on linux mnt 17.2. I am trying to access a mysql database that was installed with Bitnami. * Server: Localhost via UNIX socket * Server type: MySQL * Server connection:SSL is not being usedDocumentation <http://127.0.0.1:8080/phpmyadmin/doc/html/setup.html#ssl> * Server version: 5.7.22 - MySQL Community Server (GPL) * Server: Server: localhost:3307 <http://127.0.0.1:8080/phpmyadmin/index.php> * Protocol version: 10 * User: root at localhost * Server charset:UTF-8 Unicode (utf8) * Apache * Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $ * PHP extension: mysqliDocumentation <http://127.0.0.1:8080/phpmyadmin/url.php?url=https%3A%2F%2Fsecure.php.net%2Fmanual%2Fen%2Fbook.mysqli.php>curlDocumentation <http://127.0.0.1:8080/phpmyadmin/url.php?url=https%3A%2F%2Fsecure.php.net%2Fmanual%2Fen%2Fbook.curl.php>mbstringDocumentation <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 * Phpmyadmin Version information:4.8.0.1, latest stable version: 4.8.1 <https://www.phpmyadmin.net/files/4.8.1/> * Web Address http://127.0.0.1:8080/phpmyadmin/        I am using localhost as hostname on Tmysql57Connection.        I cannot connect the Tmysql57Connection to localhost. Help?

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

Reply by email

larrydalton71
to Michael Van Canneyt: What is the error you are getting ? If you want to connect through unix socket, you…

The error I am getting is simply "server connect failed." I am getting the same after I removed localhost from hostname.

Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: Michael Van Canneyt via Lazarus Date: 5/29/18 01:57 (GMT-05:00) To: Larry Dalton via Lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost

What is the error you are getting ?

If you want to connect through unix socket, you should leave hostname empty. If you set it to localhost, TCP/IP will be used.

Michael.

Larry Dalton wrote 37 lines
I am running lazarus 1.8.2 on linux mnt 17.2. I am trying to access a mysql database that was installed with Bitnami.    - 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)    - Server: Server: localhost:3307    <http://127.0.0.1:8080/phpmyadmin/index.php>    - Protocol version: 10    - User: root at localhost    - Server charset: UTF-8 Unicode (utf8)    - 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    - Phpmyadmin Version information: 4.8.0.1, latest stable version: 4.8.1    <https://www.phpmyadmin.net/files/4.8.1/>    - Web Address http://127.0.0.1:8080/phpmyadmin/        I am using localhost as hostname on Tmysql57Connection.        I cannot connect the Tmysql57Connection to localhost. Help?

Reply by email

larrydalton71
to Michael Van Canneyt: What is the error you are getting ? If you want to connect through unix socket, you…

The error I am getting is simply "server connect failed." I am getting the same after I removed localhost from hostname.

Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: Michael Van Canneyt via Lazarus Date: 5/29/18 01:57 (GMT-05:00) To: Larry Dalton via Lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost

What is the error you are getting ?

If you want to connect through unix socket, you should leave hostname empty. If you set it to localhost, TCP/IP will be used.

Michael.

Larry Dalton wrote 37 lines
I am running lazarus 1.8.2 on linux mnt 17.2. I am trying to access a mysql database that was installed with Bitnami.    - 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)    - Server: Server: localhost:3307    <http://127.0.0.1:8080/phpmyadmin/index.php>    - Protocol version: 10    - User: root at localhost    - Server charset: UTF-8 Unicode (utf8)    - 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    - Phpmyadmin Version information: 4.8.0.1, latest stable version: 4.8.1    <https://www.phpmyadmin.net/files/4.8.1/>    - Web Address http://127.0.0.1:8080/phpmyadmin/        I am using localhost as hostname on Tmysql57Connection.        I cannot connect the Tmysql57Connection to localhost. Help?

Reply by email

larrydalton71
to Michael Van Canneyt: What is the error you are getting ? If you want to connect through unix socket, you…

How does TMysql57Connection know how to connect to the server if there is no hostname defined?

Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: Michael Van Canneyt via Lazarus Date: 5/29/18 01:57 (GMT-05:00) To: Larry Dalton via Lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost

What is the error you are getting ?

If you want to connect through unix socket, you should leave hostname empty. If you set it to localhost, TCP/IP will be used.

Michael.

Larry Dalton wrote 37 lines
I am running lazarus 1.8.2 on linux mnt 17.2. I am trying to access a mysql database that was installed with Bitnami.    - 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)    - Server: Server: localhost:3307    <http://127.0.0.1:8080/phpmyadmin/index.php>    - Protocol version: 10    - User: root at localhost    - Server charset: UTF-8 Unicode (utf8)    - 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    - Phpmyadmin Version information: 4.8.0.1, latest stable version: 4.8.1    <https://www.phpmyadmin.net/files/4.8.1/>    - Web Address http://127.0.0.1:8080/phpmyadmin/        I am using localhost as hostname on Tmysql57Connection.        I cannot connect the Tmysql57Connection to localhost. Help?

Reply by email

Michael Van Canneyt
to larrydalton71: The error I am getting is simply "server connect failed." I am getting the same after I…

Hello,

This means the mysql_real_connect() call failed. That means mysql itself reports an error.

This means your connection parameters are somehow not correct: one of hostname, port, username or password.

At this point the database name is not yet used. First a connection is made, then the database is selected...

If you leave empty the hostname, it assumes localhost and will attempt a unix socket connection first.

Do I understand it correctly that you are running the mysql in a bitnami virtual machine ?

Is your lazarus also running in the virtual machine ? Or is lazarus running on the host computer ?

Because if that is the case, you cannot use hostname localhost, but you must use the IP address of the virtual machine.

If lazarus and mysql are running on the same (virtual) machine, then it is something else.

For instance, what username did you use ? root at localhost or root ? Hopefully the latter :).

Michael.

larrydalton71 wrote 57 lines
The error I am getting is simply "server connect failed." I am getting the same after I removed localhost from hostname. Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Michael Van Canneyt via Lazarus Date: 5/29/18 01:57 (GMT-05:00) To: Larry Dalton via Lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost What is the error you are getting ? If you want to connect through unix socket, you should leave hostname empty. If you set it to localhost, TCP/IP will be used. Michael. On Mon, 28 May 2018, Larry Dalton via Lazarus wrote: > I am running lazarus 1.8.2 on linux mnt 17.2. > I am trying to access a mysql database that was installed with Bitnami. > >    - 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) >    - Server: Server: localhost:3307 >    <http://127.0.0.1:8080/phpmyadmin/index.php> >    - Protocol version: 10 >    - User: root at localhost >    - Server charset: UTF-8 Unicode (utf8) > > >    - 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 > > >    - Phpmyadmin Version information: 4.8.0.1, latest stable version: 4.8.1 >    <https://www.phpmyadmin.net/files/4.8.1/> >    - Web Address http://127.0.0.1:8080/phpmyadmin/ > > >        I am using localhost as hostname on Tmysql57Connection. > >        I cannot connect the Tmysql57Connection to localhost. > Help? > -- _______________________________________________ Lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

Unknown author
to larrydalton71: How does TMysql57Connection know how to connect to the server if there is no hostname…
larrydalton71 wrote
How does TMysql57Connection know how to connect to the server if there is no hostname defined?

because if there's no host name it will try using a unix socket defined for the server... that /is/ local but not localhost and not using tcp/ip networking protocols... it is another way to connect to a server running on the same machine...

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.*

Reply by email

larrydalton71
to Unknown author

So what settings do I need to use?

Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: wkitty42--- via Lazarus Date: 5/30/18 12:59 (GMT-05:00) To: Cc: Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost

larrydalton71 wrote
How does TMysql57Connection know how to connect to the server if there is no hostname defined?

because if there's no host name it will try using a unix socket defined for the server... that /is/ local but not localhost and not using tcp/ip networking protocols... it is another way to connect to a server running on the same machine...

  NOTE: No off-list assistance is given without prior approval.         *Please keep mailing list traffic on the list unless*         *a signed and pre-paid contract is in effect with us.* --

Reply by email

Michael Van Canneyt
to larrydalton71

Please take a look at my reply for questions that need to be answered before we can further help you.

Michael.

larrydalton71 wrote 24 lines
So what settings do I need to use? Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: wkitty42--- via Lazarus Date: 5/30/18 12:59 (GMT-05:00) To: Cc: Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost On 05/29/2018 10:52 PM, larrydalton71 via Lazarus wrote: > How does TMysql57Connection know how to connect to the server if there is no > hostname defined? because if there's no host name it will try using a unix socket defined for the server... that /is/ local but not localhost and not using tcp/ip networking protocols... it is another way to connect to a server running on the same machine... --   NOTE: No off-list assistance is given without prior approval.         *Please keep mailing list traffic on the list unless*         *a signed and pre-paid contract is in effect with us.* -- _______________________________________________ Lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

larrydalton71
to Michael Van Canneyt

Michael, am I missing an email? The only question I found was 'what was the error message?'. Thanks, Larry

Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: Michael Van Canneyt via Lazarus Date: 5/30/18 14:50 (GMT-05:00) To: larrydalton71 via Lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost

Please take a look at my reply for questions that need to be answered before we can further help you.

Michael.

larrydalton71 wrote 24 lines
So what settings do I need to use? Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: wkitty42--- via Lazarus Date: 5/30/18  12:59  (GMT-05:00) To: Cc: Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost On 05/29/2018 10:52 PM, larrydalton71 via Lazarus wrote: > How does TMysql57Connection know how to connect to the server if there is no > hostname defined? because if there's no host name it will try using a unix socket defined for the server... that /is/ local but not localhost and not using tcp/ip networking protocols... it is another way to connect to a server running on the same machine... --   NOTE: No off-list assistance is given without prior approval.         *Please keep mailing list traffic on the list unless*         *a signed and pre-paid contract is in effect with us.* -- _______________________________________________ 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/20180530/1b6cd865/attachment-0001.html>

Reply by email

Michael Van Canneyt
to larrydalton71

Seems you are missing one. I've resent it. Sent also to your private email address. (At least I have seen it appearing on the mailing list)

Michael.

larrydalton71 wrote 37 lines
Michael, am I missing an email? The only question I found was 'what was the error message?'. Thanks, Larry Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: Michael Van Canneyt via Lazarus Date: 5/30/18 14:50 (GMT-05:00) To: larrydalton71 via Lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost Please take a look at my reply for questions that need to be answered before we can further help you. Michael. On Wed, 30 May 2018, larrydalton71 via Lazarus wrote: > So what settings do I need to use? > > > Sent from my Verizon, Samsung Galaxy smartphone > -------- Original message --------From: wkitty42--- via Lazarus Date: 5/30/18  12:59  (GMT-05:00) To: Cc: Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost > On 05/29/2018 10:52 PM, larrydalton71 via Lazarus wrote: >> How does TMysql57Connection know how to connect to the server if there is no >> hostname defined? > > > because if there's no host name it will try using a unix socket defined for the > server... that /is/ local but not localhost and not using tcp/ip networking > protocols... it is another way to connect to a server running on the same machine... > > > -- >   NOTE: No off-list assistance is given without prior approval. >         *Please keep mailing list traffic on the list unless* >         *a signed and pre-paid contract is in effect with us.* > -- > _______________________________________________ > Lazarus mailing list > > https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

Larry Dalton
to larrydalton71: Michael, am I missing an email? The only question I found was 'what was the error…

The error message reads :Project MoneyProject raised exception class:'ESQLDatabaseError' with message:'CreateConnection:Server Connect Failed."

larrydalton71 wrote 55 lines
Michael, am I missing an email? The only question I found was 'what was the error message?'. Thanks, Larry Sent from my Verizon, Samsung Galaxy smartphone -------- Original message -------- From: Michael Van Canneyt via Lazarus Date: 5/30/18 14:50 (GMT-05:00) To: larrydalton71 via Lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost Please take a look at my reply for questions that need to be answered before we can further help you. Michael. On Wed, 30 May 2018, larrydalton71 via Lazarus wrote: > So what settings do I need to use? > > > Sent from my Verizon, Samsung Galaxy smartphone > -------- Original message --------From: wkitty42--- via Lazarus < > Date: 5/30/18 12:59 (GMT-05:00) To: Cc: Subject: Re: [Lazarus] TMysql57Connection won't connect to localhost > On 05/29/2018 10:52 PM, larrydalton71 via Lazarus wrote: >> How does TMysql57Connection know how to connect to the server if there is no >> hostname defined? > > > because if there's no host name it will try using a unix socket defined for the > server... that /is/ local but not localhost and not using tcp/ip networking > protocols... it is another way to connect to a server running on the same machine... > > > -- > NOTE: No off-list assistance is given without prior approval. > *Please keep mailing list traffic on the list unless* > *a signed and pre-paid contract is in effect with us.* > -- > _______________________________________________ > 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/20180603/8209ede5/attachment.html>

Reply by email