I'm sure my problem is permissions related, yet I don't know what my next step should be.
After accessing mysql via: mysql -u root -p I was able to create a database.
When I try and access it via a php script, mysqli_connect_error() tells me: Access denied for user 'pi'@'localhost' (using password: YES)No database selected
In my php script there is: $con=mysqli_connect("localhost","pi","*******","db_name");
mysql_select_db("db_name");
I've double checked, all that content is correct.
While logged in to the database as root (via mysql -u root -p) I am able to access the database, create a table, insert content into it and read it back via "SELECT * FROM created_table".
FWIW, when I access mysql with a simple "mysql" at the command line, I do get the "mysql>" prompt. But SHOW DATABASES; does not list the "db_name" I created with root and it does not allow me to create a database.
Am I wrong to be able to expect to access a database created while root from a php script on a web page? How should I be approaching this??
Thanks from a Noobie.