Hi,
I’m new to mysql & php. I am building a small site that I want to connect to my db and edit tables. I have a connection called ‘test’ where I built my db & I am trying to connect to it. The script I am using is where I have hardcoded the variables (I know not proper coding but this is for learning purposes)…
$username = “Bob”;
$password = “mypassword”;
$hostname = “localhost”;
$dbhandle = mysql_connect($hostname, $username, $password)
or die(“Unable to connect to MySQL”);
When I load the page the result is…
UN=Bob
PW=mypassword
HN=localhost
Unable to connect to MySQL
The mysql I believe was setup when I built the computer & the password my be incorrect. How can I determine my password? Is the coding correct?
In mysql workbench under SQL Development I created a connection called Test and it shows my username as ‘Bob’ and Host as 127.0.0.1:3306. Is there more I need to setup under mysql?
Thanks for the help in advance.
K