PDA

View Full Version : MySQL user permissions


wharris
09-09-2002, 11:18 AM
As a step toward developing an office intranet using PHP/MySQL, I have set up a box at home with the latest stable versions of Mandrake Linux/Apache/PHP/MySQL. To get started, I have replicated a couple of my sites on FutureQuest on this box. Using phpMyAdmin, I have added a new user to the user table and granted what I thought were the necessary privileges (everything but process, shutdown and reload). But I can't access the MySQL databases in my PHP scripts when I pop this username and password into my config file. The only way I can access the databases via PHP scripts is by popping the username and password for root - obviously not something I would want to do in a production environment.~# Can someone tell me what I'm doing wrong?

Thanks,
Wayne

dank
09-10-2002, 01:26 AM
When I set up Apache/MySQL/PHP on my Win XP machine, I recall setting the database stuff through mysqlwinadmin or whatever that included utility is called (I know I didn't do anything in phpMyAdmin with regards to users).

Dan

wharris
09-10-2002, 07:57 AM
Dan,

Thanks, that's more or less what finally worked for me with my Linux setup. Some stuff has to happen to the database table in MySQL for the privileges granted in the user table to be fully functional. That happens automatically when privileges are granted via the shell account command line. I granted all privileges to my non-root user at the command line and then revoked those that needed revoking through phpMyAdmin, and I was good to go.:)

Thanks also for the edit plus recommendation in another thread. Looks to be better than Homesite at a third the cost. Quanta Plus is pretty capable on the Linux side, but it lacks a couple of features I find almost indispensible: multiple-file search/replace and line-numbering. (You can "go to" a line indentified by the PHP error log, but it's nice to have them right there in the left margin.)

Wayne