Next is to download the latest version of phpMyAdmin at http://www.phpmyadmin.net/home_page/downloads.php and extract the files to the appropriate directory inside your IIS web root (C:\Inetpub\wwwroot\) so that IIS is able to access it. You may wish to create a separate website for your phpMyAdmin installation, or simply add it as a sub directory or virtual directory under an existing website. Either way you'll need to make sure that the user account used by IIS to access your files has at least NTFS read permissions to all of your files once they are in place.In this guide we'll place the phpMyAdmin files in a directory called "pma" under the root directory of a website "localhost". With all this in mind, then to access the phpMyAdmin installation used in this guide you would type the following into the address bar of your web browser "http://localhost/pma".
PHP Settings
phpMyAdmin uses several PHP extensions to perform its various functions. The extensions you'll need for phpMyAdmin are:
- MySQL (to connect to the MySQL server)
- MCrypt (highly recommended for performance when using the cookie authentication method, and actually required for 64-bit environments)
- MBString (used for multi-byte character support)
- GD2 (image creation and manipulation library)
;extension=php_gd2.dllThese extensions should now be loaded into your PHP environment, and can be verified using the phpinfo function.
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mysql.dll
Creating you phpMyAdmin config file
Next is to create your config file for the phpMyAdmin. To do this the easiest way is to copy the config.sample.inc.php file in you phpMyAdmin root directory and rename it to config.inc.php. Using this sample config file as a base means there are literally only a handful of settings that need to be added or altered so that you have a working configuration. Make sure you add/edit in the following:
$cfg['blowfish_secret'] = '<typeinanywordinhere>';
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = '<yourMySQLUsername>'; <yourMySQLPassword>
$cfg['Servers'][$i]['password'] = '';
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* User for advanced features */
$cfg['docSQLDir'] = 'docsql';
$cfg['ShowPhpInfo'] = true;
$cfg['ShowChgPassword'] = true;
$cfg['AllowArbitraryServer'] = false;
$cfg['LoginCookieRecall'] = 'something';
$cfg['LoginCookieValidity'] = 1800;
$cfg['AllowAnywhereRecoding'] = true;
$cfg['DefaultCharset'] = 'iso-8859-1';
$cfg['RecodingEngine'] = 'iconv';
$cfg['IconvExtraParams'] = '//TRANSLIT';
$cfg['GD2Available'] = 'yes';
$cfg['CheckConfigurationPermissions'] = FALSE;
$cfg['Servers'][$i]['hide_db'] = '(information_schema|phpmyadmin|mysql)';
From here you should actually be able to log into your new phpMyAdmin installation by typing http://localhost/pma to your web browser. phpMyAdmin won't be asking for your MySQL Username and Password since you already stored it in $cfg['Servers'][$i]['user'] and $cfg['Servers'][$i]['password'].
Now we need to configure the privileges for the Username you used in accessing MySQL Server 5.0. Open MySQL Command Line Client by clicking Start > All Programs > MySQL > MySQL Command Line Client. Enter your password and type in the following SQL Statements:
GRANT USAGE ON mysql.* TO 'yourMySQLUsername'@'localhost' IDENTIFIED BY 'yourMySQLPassword';
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 'yourMySQLUsername'@'localhost';
GRANT SELECT ON mysql.db TO 'yourMySQLUsername'@'localhost';
GRANT SELECT ON mysql.host TO 'yourMySQLUsername'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'yourMySQLUsername'@'localhost';
GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO
'yourMySQLUsername'@localhost;
What we did was we enabled all access to the Username you used in MySQL Server and hurray! Your phpMyAdmin is now working properly! You may now access phpMyAdmin in http://localhost/pma to your browser with no problems.
If you have any comments, questions about the installation and suggestions please feel free to post here. Thanks again for sticking around! ^_^
No comments:
Post a Comment