I am logged into mysql with terminal on mac Lion, but I get an error running php testscript
these where my steps:
virtualhost is "test.dev"
after Homebrew install logged in with:
mysql -u root
created database
CREATE DATABASE `lara` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
output php testscript
<?php
$num_entries = 20;
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "redres"; (at first was set to root)
$dbname = "lara";
$con = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$con) die('Could not connect: ' . mysql_error());
mysql_select_db($dbname, $con);
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /Users/redres/Webdev/testsite/index.php on line 19
Could not connect: Access denied for user 'root'@'localhost' (using password: YES)
now setting a password
mysqladmin -u root password xxx
I have restarted mysql and also granted "root" al priviliges
I still cannot connect
Where do I look to fix this?