I use PhpMyAdmin to setup mysql tables and such.
I also have root (full) access to everything.
Currently I have this in my phpMyAdmin under the privileges tab:
USER: HOST: PASS: GLOB PRIVILEGES:
phpmyadmin localhost Y USAGE No
root 127.0.0.1 Y ALL PRIVILEGES Y
root localhost Y ALL PRIVILEGES Y
root domain.com Y ALL PRIVILEGES Y
db1 localhost Y ALL PRIVILEGES Y
db2 localhost Y ALL PRIVILEGES Y
user localhost Y USAGE No
And I use this to connect via PHP:
$dbhost ='localhost';
$dbuser ='db2';
$dbpass ='password_here';
$dbname ='db2';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
mysql_select_db($dbname,$conn) or die(mysql_error());
mysql_set_charset('utf-8', $conn);
What confuses me is that if I change the password of the user lets say “db2” to something, and try using that in my PHP code for connecting, I don’t get access. I am using an old password and it works even though I change passwords in phpMyAdmin to the database.
I don’t even remember setting the first password up, it must have been a long time ago.
Thats my first problem!
Btw, when I click “change privileges”, then the fields where it says if it is supposed to use password or not, is displaying “Dont change the password” from the drop list. Shouldn’t it say something like “Use textfield”?
Second is that I need to know how it SHOULD be set up, from the start to end…
I have my own server and I am a rookie at maintaining my own servers, but I am learning everyday.
But this information is something I didn’t find on the web.
What do I need to setup on my server? my.cnf? etc…
try