Reputation: 331
i am new to php and getting error whole connecting to mysql as i have my sql install in my virtual machine having ip 192.168.1.104 and i am using this mysql in my machine server 2003 having ip 192.168.1.102 an i am successfully using it on server using mysql client but on server when i am trying to access mysql for php my making connection i am getting error...
here is the connection i mande for mysql from php,
<?php
$port = "3306";
$server = "192.168.1.104:".$port;
$dbname ="VideoResume";
$user = "root";
$pass = "nagios";
$conn = mysql_connect ($server, $user, $pass) or die ("Connection Error or Bad Port");
mysql_select_db($dbname) or die("Missing Database");
?
>
the error as i attach file with mysqlerror name
hopes to listen from you soon thanks in advance
Regards,
-syed mohsin raza
Upvotes: 0
Views: 114
Reputation: 8881
the error itself is clear that you need to reset root's password:
The commands are
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;
you might want to take a look at
Upvotes: 3