Simply connecting to mysql server, username password and host all are correct.
Still mysql_error() throws the following error:
Warning: mysql_connect(): No such file or directory in
save.php on line 6
No such file or directory
When I change it from 'localhost' to '127.0.0.1', it gives error:
Warning: mysql_connect(): Connection refused in
save.php on line 6
Connection refused
The same connection is working without any issue for a wordpress website on the same host.
When I enter wrong password, mysql throws error of password not exist
What does it mean ?
[Update]
I checked my phpinfo() and
mysql.default_socket no value no value
same for default_host, user, password etc.
I tried
ini_set("mysql.default_socket","/var/run/mysqld/mysqld.sock");
as mention in php.ini but no luck.
Again its working for a wordpress previous install and its wp_config has the same mysql access. For wrong password sometime it throws "password not exist"