0

I'm trying to get data from PostgreSQL from another computer and move to MySQL on my local computer.

I got libmysql55.dll from Zeos repository.

I had to create a program to fix a lot of mistakes over database.

One error is happening:

SQL Error: Access denied for user 'xxxx'@'localhost' (using password: YES)

I have information about: database, hostname, user and password.

ZConPropro.HostName := edtProproIP.Text;
ZConPropro.User     := edtUser.Text;
ZConPropro.Password := edtPassword.Text;
ZConPropro.Database := edtDatabase.Text;

The problem is happening when I try to connect:

ZConPropro.Connected := True;

I selected protocol: PostgreSQL and after postgresql9 and nothing is happening.

I would like to know if someone has this problem and there is some parameter to change.

I'm connecting to this database with HeidiSQL without a problem...same user, password, and database.

  • 1
    Side note: did you try to use latest Zeos version? 7.2/7.3 branches still support Delphi 7, and have had a lot of enhancements. – Arnaud Bouchez Apr 17 '18 at 20:20

1 Answers1

1

You need postgresql client library libpqXX.dll for connection. libmysql55.dll using for MySQL only. Given error message look like MySQL error message. It is said that user xxxx successfully connected to system but it is not authorized to connect this server from localhost. You need to check mysql.user table for user xxxx host config and/or change it. Don't forget run flush privileges after any change.

mkysoft
  • 5,392
  • 1
  • 21
  • 30
  • Do you know where I can find this DLL (something official)? and How can I put this DLL to be recognized? – Wellington Telles Cunha Apr 17 '18 at 18:41
  • You can find it at: http://pqxx.org/development/libpqxx/ You can put it into system32 or your app folder. Some dll need to be register in system32. App folder is good option I think. – mkysoft Apr 17 '18 at 19:39
  • 2
    It might not be the only library you'll need. And I would highly recommend to use the client library from the PostgreSQL's installation directory, something like `C:\Program Files\PostgreSQL\9\bin\libpq.dll`. – Victoria Apr 17 '18 at 21:53
  • @Victoria, can you point me to any guidance on getting Delphi 7 configured to connect to PostgreSQL? I have the default dbxdrivers.ini that has sections only for Interbase and MYSQL. – tim11g Mar 31 '20 at 21:41