Reputation: 31
I am developing a php application that needs to connect to mysql database in a remote host.
I am using putty for SSH. Mysql workbench can successfully connect to the remote server and browse the database and the putty also connects without a problem and allow me to work with command line.
But the web application cannot connect.
It says access denied for user, the same username and password that I use to connect in putty command line .
I am using windows 7 and wamp sever 2.4 with Apache Version : 2.4.4
PHP Version : 5.4.16 .
can anyone help me solve this issue?
Upvotes: 2
Views: 810
Reputation: 31
I uncomment skip-networking in mysql.ini in wamp server. it is working now
Upvotes: 1
Reputation: 4607
This has nothing to do with SSH username and password, You must use these parameters :
$host = 'the host or IP that you are connecting with putty';
$username = 'mySQL username';
$password = 'mySQL passwrod';
//mySQL connection with above parameters .
Upvotes: 0