Koozali.org: home of the SME Server

MYSQL

Tyrone Miles

MYSQL
« on: December 08, 2001, 06:20:04 PM »
Does anyone know how to grant permission in mysql to apache. So then when I run a script (like a PHP script) Apache can add tables and settings to a database?

Dan Brown

Re: MYSQL
« Reply #1 on: December 08, 2001, 07:24:35 PM »
You don't need to do this.  What you do need to do is give the PHP script the username and password of a user who has the permissions you need.  This has been discussed here about a zillion times; try a search on mysql password.

Dan G.

Re: MYSQL
« Reply #2 on: December 09, 2001, 01:43:20 AM »
For the php application you want to enable, find the config.inc.php file that it uses, and add the mysql root password, found in the hidden file /root/.my.cnf.  For example, the Phpmyadmin app relies on a file called /opt/administration/phpmyadmin/config.inc.php --- to enable that app you need to edit this file.

That should match the password found in /etc/openldap/ldap.pw.  If those get out of sync, look at this bug report to straighten it out: http://www.e-smith.org/bugs/index.php3?op=showBug&bugID=51

The password you are looking for is likely to be a humongous 75-character mixed-case alphanumeric string --- so make sure you copy and paste it correctly, or you'll have all kinds of head-scratching, indigestion and other gastic disturbances.  I had a bunch of trouble getting this sorted out at one point.  Good luck.

Dan

Dan Brown

Re: MYSQL
« Reply #3 on: December 09, 2001, 01:47:19 AM »
...or, better yet, create a separate MySQL user for each application you want to use.  Again, do a search--this has been discussed many times around here.

Tyrone Miles

Re: MYSQL
« Reply #4 on: December 09, 2001, 01:57:24 AM »
Well I am trying to set up a program called PHProjekt. You start with a setup page that asks for the database you want to use, the username and password. When I enter them wrong it does nothing, but when I enter what I created the program takes you to a config page that you fill out and you commit. When you commit the page it makes the file config.inc.php, and it's supposed to also create all the tables you need to store the data for the program, but when I commit I get an error like this:

An error ocurred while creating table: 'dateien'
An error ocurred while creating table: 'profile'
An error ocurred while creating table: 'todo'
An error ocurred while creating table: 'forum'
An error ocurred while creating table: 'votum'
An error ocurred while creating table: 'lesezeichen'
An error ocurred while creating table: 'ressourcen'
An error ocurred while creating table: 'projekte'
An error ocurred while creating table: 'timeproj'
An error ocurred while creating table: 'contacts'
An error ocurred while creating table: 'notes'
An error ocurred while creating table: 'timecard'
An error ocurred while creating table: 'grup_user'
An error ocurred while creating table: 'rts'
An error ocurred while creating table: 'rts_cat'
An error ocurred while creating table: 'users'
An error ocurred while creating table: 'termine'
insert command denied to user: 'tmiles@localhost' for table 'gruppen'

When I wrote in forum for users of this program I was told that Apache does not have permission to create the tables and inserts. So I figured that someone on the e-smith forum would know how to give Apache the permission to make these tables. I have not found anything on how to do it after searching through this forum several times.

Dan G.

Re: MYSQL
« Reply #5 on: December 09, 2001, 06:14:23 AM »
Tyrone,

I installed Phprojekt using "root" as the login.  In my investigation of Phprojekt, I noted that some people had to put in 'root@localhost' in order to get it to work.  I also had to paste that long 75-character ldap password into the tiny little box on the config.php page.  It took me a bit of messing around with various combinations of username and password, but I believe 'root' and the 75-character password from the ldap.pw file were the winning combo.

As Charlie stated, experienced admins seem to prefer creating a new account for each new db app they install, for the additional security.  Since I am still in "quick, dumb, and dirty" mode, I have been implementing all of mine as root.  Now that I'm making some progress on understanding this stuff, I plan to go back and create some accounts for the various applications, and get my systems up to 'spec.'  For quick testing with minimal learning curve though, using 'root' will get you there.

Dan

sabu

Re: MYSQL
« Reply #6 on: February 28, 2002, 08:54:05 AM »
somone maybe wanna write a full howto to install PHProjekt from scratch...
i don't know how to use MySQL...

Tyrone Miles

Re: MYSQL
« Reply #7 on: February 28, 2002, 10:00:07 PM »
If you read the how-to I put out you'll notice that I put the relevent commands for my SQL in the how-to. You don't need to know how to use my SQL (I don't really know how to use my SQL) But using the commands on the how-to you can set up my SQL for use with PHProjekt.