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