[SOLVED] Do I need USER account in MySQL db for PHP query?
Posted: Thu Jan 22, 2004 6:54 pm
Hello,
//*This my first POST here, so
IF (I make an error)
THEN (Please forgive me)
ELSE (Tell me how to avoid making one in the future)
WHILE (I was working on my Search Eng.
I screened a lot of PHP-scripts but still I dont know how the language functions, However I have medium knowledge of MySQL
[b]So I encountered a problem,
Whenever PHP script queryies mysql_db there is a part of the code concerning: host, user and pass
in the exapmles those were usualy localhost, -u, -p.
MY QUESTION - DO I NEED TO MAKE NEW USER IN THE DATABASE - DB IS ON MY HOSTING PROVIDERS SITE ( AND I GOT PASSWORD TO MANAGE IT ), AND GRANT HIM (USER) SOME PRIVILEDGES AND RELATED STUFF, OR DO I JUST QUERY DB WITH PHP. MY CONCERN IS THAT NO ONE WILL BE ALLOWED TO INSERT - UPDATE - DELETE - DROP SOMETHING IN THE DATABASE, AND I DONT UNDERSTAND IF THE PHP CAN DO IT, WHY CANT SOMEONE FROM THE INTERNET DO THE SAME THING - JUST ALTER THE CODE AND MAKE ME SUFFER
[/b]
I already have some books on PHP, BUT they just tell about some segments of PHP, I can't learn logic of the language from them - And I see that PHP and MySQL logic differs considerably.
THANKS AHEAD... AND IF POSSIBLE REPLY TO THIS AS SOON AS POSSIBLE, BECAUSE I MUST FINISH THIS IN TWO WEEKS.
//*This my first POST here, so
IF (I make an error)
THEN (Please forgive me)
ELSE (Tell me how to avoid making one in the future)
WHILE (I was working on my Search Eng.
I screened a lot of PHP-scripts but still I dont know how the language functions, However I have medium knowledge of MySQL
[b]So I encountered a problem,
Whenever PHP script queryies mysql_db there is a part of the code concerning: host, user and pass
in the exapmles those were usualy localhost, -u, -p.
MY QUESTION - DO I NEED TO MAKE NEW USER IN THE DATABASE - DB IS ON MY HOSTING PROVIDERS SITE ( AND I GOT PASSWORD TO MANAGE IT ), AND GRANT HIM (USER) SOME PRIVILEDGES AND RELATED STUFF, OR DO I JUST QUERY DB WITH PHP. MY CONCERN IS THAT NO ONE WILL BE ALLOWED TO INSERT - UPDATE - DELETE - DROP SOMETHING IN THE DATABASE, AND I DONT UNDERSTAND IF THE PHP CAN DO IT, WHY CANT SOMEONE FROM THE INTERNET DO THE SAME THING - JUST ALTER THE CODE AND MAKE ME SUFFER
I already have some books on PHP, BUT they just tell about some segments of PHP, I can't learn logic of the language from them - And I see that PHP and MySQL logic differs considerably.
THANKS AHEAD... AND IF POSSIBLE REPLY TO THIS AS SOON AS POSSIBLE, BECAUSE I MUST FINISH THIS IN TWO WEEKS.