[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] MySQL Database
- Subject: Re: [cobalt-users] MySQL Database
- From: "bluepanel.org" <raqlist@xxxxxxxxxxxxx>
- Date: Wed Mar 24 20:54:01 2004
- Organization: bluepanel.org
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
On Wed, 24 Mar 2004 19:39:02 -0800
Bruce Timberlake <bruce@xxxxxxxxxx> wrote:
> So it's apparently using .htaccess files for it's authentication. Check the
> file in the web dir(s) for the domain(s) this is installed under.
>
> If there is no .htaccess file, you'll need to make one.
No, there will not be a .htaccess file. Phpmyadmin uses php HTTP Authentication (PHP_AUTH_USER & PHP_AUTH_PW), see http://www.php.net/features.http-auth . So you do not need a .htaccess file.
Set up your phpmyadmin config.inc.php file like this;
$cfg['Servers'][$i]['controluser'] = 'root'; // MySQL control user settings
$cfg['Servers'][$i]['controlpass'] = 'rootpassword'; // access to the "mysql/user"
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
replace 'rootpassword' with the actual mysql root password.
Once you have phpmyadmin going you will want to create a controluser so you do not need to have the root password in the config file.
full instructions are available at http://www.phpmyadmin.net/documentation/
# For 'HTTP' and 'cookie' modes, phpMyAdmin needs a controluser that has only the SELECT privilege on the mysql.user (all columns except "Password"), mysql.db (all columns) & mysql.tables_priv (all columns except "Grantor" & "Timestamp") tables.
You must specify the details for the controluser in the config.inc.php file under the $cfg['Servers'][$i]['controluser']& $cfg['Servers'][$i]['controlpass'] settings.
The following example assumes you want to use pma as the controluser and pmapass as the controlpass, but this is only an example: use something else in your file!
Of course you have to replace localhost by the webserver's host if it's not the same as the MySQL server's one.
GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
GRANT SELECT (
Host, User, 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,
Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
Execute_priv, Repl_slave_priv, Repl_client_priv
) ON mysql.user TO 'pma'@'localhost';
GRANT SELECT ON mysql.db TO 'pma'@'localhost';
GRANT SELECT ON mysql.host TO 'pma'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'pma'@'localhost';
If you are using an old MySQL version (below 4.0.2), please replace the first GRANT SELECT query by this one:
GRANT SELECT (
Host, User, 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
) ON mysql.user TO 'pma'@'localhost';
--
flame
flame@xxxxxxxx
www.fraq.net because screaming at it will get you nowhere.
http://www.fraq.net