Web Hosting Talk







View Full Version : phpmyadmin


hennaboy
01-12-2002, 09:14 AM
is there a way that i can install this so that it is available to every user and will be available for new users.

for example when i create a new virtual site then it is automatically created with phpmyadmin installed.

thanks

ASPCode.net
01-12-2002, 09:21 AM
Lets say you upload all phpmyadmin files to /home/sites/home/web/phpMyAdmin

Then just
pico /etc/httpd/conf/srm.conf

and add this alias

Alias /phpMyAdmin/ /home/sites/home/web/phpMyAdmin/

Make sure you are using advanced authentication for phpMyAdmin - read up in the installation docs.

However, there is a problem with this - all users will be able to see the name of all databases available ( although they might not have the right to see anything inside them ). When I developed shadm I modified phpMyAdmin sp it only shows the current users own databases. Not many lines to change so if you have some knowledge in PHP it will be pretty easy.

hennaboy
01-12-2002, 09:31 AM
okay

so if i modified it as you did then did what you suggest would a user only be able to see their databases?

hypernatic.net
01-12-2002, 10:26 AM
Originally posted by ASPCode.net
However, there is a problem with this - all users will be able to see the name of all databases available ( although they might not have the right to see anything inside them ). When I developed shadm I modified phpMyAdmin sp it only shows the current users own databases. Not many lines to change so if you have some knowledge in PHP it will be pretty easy.

In previous versions of phpMyAdmin this would not show... You have a fix for this?

hoot
01-15-2002, 03:50 PM
I don't know what you are talking about but I have installed the last version of phpmyadmin and set it to advanced auth and each user can only see his or her databases !
And I dont see why with this modification you would see all the databases. But I've never tried changing the .conf files do I just edit it than OK or do I have to restart something ?
Please could you give me detailed instructions and if there is somewhere special to put the line in the file ,

hoot

ASPCode.net
01-15-2002, 05:08 PM
Ok, maybe the latest version ( realeased this year I think ) has gotten it fixed but in previous versions ALL databases on a server is listed in the left view.

Of course the user could not view any tables or anything in other users database but still the names of the databases were listed to the left.

hoot
01-16-2002, 06:22 AM
Well the last 2 versions seemed to work with me...

hoot

DaWiseMouse
01-16-2002, 04:00 PM
if the above does not work or is not true on your server, I found the following works well

create a DB
create a user in DB USER

then run the following:

Click on databse "mysql" (left frame)
Modify two lines below with correct username, database and password.
Paste first line, click go then second, click go.

INSERT INTO user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv) VALUES ('localhost', 'username', PASSWORD('password'), 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N')

INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv) VALUES ('localhost', 'database', 'username', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '')

Paste this line if the two above were successful:

FLUSH PRIVILEGES

this works perfectly for me...

beglobal
01-22-2002, 10:35 PM
I tried the changes to srm.conf to allow sites to use phpmyadmin with their own domain and it worked last night, but quit working today. In fact, the entire install of phpmyadmin quit working (if you went to it, you would only get a directory listing.)

So I renamed the directory to something new (phpmyadmin2), and it started working again, but only for the real domain that it is installed under. I edited srm.conf again to reflect the new directory name, and it still won't work.

Any ideas?

Thanks,
Johnathan

DaWiseMouse
01-23-2002, 01:25 AM
Be sure of exactly how you add it to the SRM.CONF if you set it as /phpmyadmin then thats how it has to be run, if you set it as /phpmyadmin/ then it needs to be exactly that.. I had that same issue at first as well.. Mouse

beglobal
01-23-2002, 09:34 AM
Checked, and double checked. In fact, it actually worked for a bit... that is the weird part. My Alias looks something like this:

Alias /phpmyadmin2/ /home/sites/site16/web/phpmyadmin2/

As of this morning it is working again. This is making me wonder whether or not there is a nightly process that is causing the problem. I restarted the server after making the changes last night, and it still didn't work. But now it does.

Oh well... I'll let it go for a while, and post back if it quits working again.

Thanks,
Johnathan

hoot
02-26-2002, 12:32 PM
However, there is a problem with this - all users will be able to see the name of all databases available ( although they might not have the right to see anything inside them ). When I developed shadm I modified phpMyAdmin sp it only shows the current users own databases. Not many lines to change so if you have some knowledge in PHP it will be pretty easy.

ANyone found an answer to this? I've just got a new server and when you don't choose advanced auth then you can see all the databases and their contect. It can be phpmyadmin's problem it must be something to do with mysql as phpmyadmin is only a script, does this mean that any script can see all the databases on the server and their contents ??? (what is the point of paswords then ?????)

Hoot

beglobal
02-26-2002, 09:12 PM
Why not use advanced authentication? I have it set up that way, and all users are using the same install of phpmyadmin, but they only see databases that they have access to. No problems at all...

andrewfayor
02-27-2002, 03:41 AM
Hi there,

If i'm not wrong, Cobalt is using Interbase6 as the database manager.

Is it ok to have 2 database in one server (Interbase and phpMyAdmin or MySQL)?

DaWiseMouse
02-27-2002, 03:52 AM
dunno about the interbase thing, but im using MySQL with phpmyadmin with Advanced Authentication and having no problems at all.. Mouse

Chicken
02-27-2002, 06:30 AM
Originally posted by andrewfayor
Hi there,

If i'm not wrong, Cobalt is using Interbase6 as the database manager.

Is it ok to have 2 database in one server (Interbase and phpMyAdmin or MySQL)?
Phpmyadmin is just a script to control/edit/etc. mysql databases, but yes, you can have Interbase and Mysql installed on the same server.