MySQL -- Need some help getting it configured.

Ka0t1x

Golden Member
Jan 23, 2004
1,724
0
71
Running a home webserver for learning purposes ..


I've got Apache w/ PHP5 up and running correctly, I was just wondering how to go about installing/conf MySQL? I've downloaded it, installed it, gives me a root login/pw, I've created a user account and another database, but it just won't connect to it.

Is there anything else I should be doing? httpd.conf?
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
You mean that a PHP script running on apache can't connect to it?
Did you give permissions to the database to the user that apache is running as?

For example, on RedHat, Apache runs as the user apache, so as root in mysql you would issue a query like this:

GRANT select ON my_test_db TO apache@localhost;

You can of course grant various permissions, and fine tune it by table as well.