Discussion Locked

root- only user accepted in mysql server

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I tried setting up a database server with
RH7.1, apache, mysql, php.

why is it that the only time i can connect to the database server is when I use
@ $db = mysql_pconnect ("localhost", "root", "password");
in the .php files

if i use otherusers such as:
@ $db = mysql_pconnect ("localhost", "user1", "password1");

the browser from both the local and remote machines displays "can't connect to the database"

2 replies

by servermonkey

did you grant permission to user1 in mysql?

ex: grant all on * to user1@localhost identified by 'password';

where all could be changed to update, select, etc.

* refers to databases. You could also do something like *.database1 where * is the tables of database1

by luie

yes, i've already assigned permission for user1.
after further tests, i found out that i can't even loggin as user1 on mysql when i'm using the local machine eventhough i've already created user1 in mysql.

This discussion is closed to new replies.