0

I'm moving an old application between two windows server (see data below).

I keep attention to have php.ini, my.ini, httpd.conf, httpd-vhosts.conf alligned.

I know, PHP version is too old and even worse the code use mysql_connect.

On the old server the instruction mysql_connect('localhost', 'root', 'my_password'); works without problems.

On the new server the same istruction gives Access denied for user 'root'@'localhost' (using password: YES).

If I call the function without password, the connection works.

I access phpmyadmin with root and my_password.

User root has Password YES, Global privileges ALL PRIVILEGES, Grant YES.

Someone have a suggestion (other than upgrade PHP and connection library) where to look for the problem?

Systems setup:

Old server

  • Windows Server 2008 R2 Enterprise
  • Apache 2.4.23
  • PHP 5.6.25
  • MySQL 5.7.14

New server

  • Windows Server 2019 Datacenter
  • Apache 2.4.41
  • PHP 5.6.40
  • MySQL 5.7.28
Chris Haas
  • 53,986
  • 12
  • 141
  • 274
mYmage
  • 92
  • 2
  • 14
  • I think this might better be asked over at [DBA](https://dba.stackexchange.com/), although it might also fall under [Server Fault](https://serverfault.com/), too – Chris Haas Dec 13 '21 at 17:46

1 Answers1

0

After looking around for a while and doing some test, I used the "workaround" to uninstall wamp and reinstall the exact same version (wamp server 3.0.6 with 3.0.8 update) and align the config files.

Now the app goes without problems.

mYmage
  • 92
  • 2
  • 14