1.安装
myadmin是php程序写的,php的跨平台性,使得一个版本在所有系统都可以使用。
- Choose an appropriate distribution kit from the phpmyadmin.net Downloads page. Some kits contain only the English messages, others contain all languages. We’ll assume you chose a kit whose name looks like phpMyAdmin-x.x.x -all-languages.tar.gz.
- Untar or unzip the distribution (be sure to unzip the subdirectories): tar -xzvf phpMyAdmin_x.x.x-all-languages.tar.gz in your webserver’s document root. If you don’t have direct access to your document root, put the files in a directory on your local machine, and, after step 4, transfer the directory on your web server using, for example, ftp.
- Ensure that all the scripts have the appropriate owner (if PHP is running in safe mode, having some scripts with an owner different from the owner of other scripts will be a problem). See 4.2 What’s the preferred way of making phpMyAdmin secure against evil access? and 1.26 I just installed phpMyAdmin in my document root of IIS but I get the error “No input file specified” when trying to run phpMyAdmin. for suggestions.
- Now you must configure your installation. There are two methods that can be used. Traditionally, users have hand-edited a copy of config.inc.php, but now a wizard-style setup script is provided for those who prefer a graphical installation. Creating a config.inc.php is still a quick way to get started and needed for some advanced features.
Using Setup script
Instead of manually editing config.inc.php, you can use the Setup Script. First you must manually create a folder config in the phpMyAdmin directory. This is a security measure. On a Linux/Unix system you can use the following commands:
Next, open setup/ in your browser. If you have an existing configuration, use the Load button to bring its content inside the setup panel. Note that changes are not saved to disk until you explicitly choose ``Save`` from the Configuration area of the screen. Normally the script saves the new config.inc.php to the config/ directory, but if the webserver does not have the proper permissions you may see the error “Cannot load or save configuration.” Ensure that the config/ directory exists and has the proper permissions - or use the Download link to save the config file locally and upload it (via FTP or some similar means) to the proper location.
Once the file has been saved, it must be moved out of the config/ directory and the permissions must be reset, again as a security measure:
Instead of manually editing config.inc.php, you can use the Setup Script. First you must manually create a folder config in the phpMyAdmin directory. This is a security measure. On a Linux/Unix system you can use the following commands:
cd phpMyAdmin
mkdir config # create directory for saving
chmod o+rw config # give it world writable permissions
And to edit an existing configuration, copy it over first:
cp config.inc.php config/ # copy current configuration for editing
chmod o+w config/config.inc.php # give it world writable permissions
On other platforms, simply create the folder and ensure that your web server has read and write access to it.
Next, open setup/ in your browser. If you have an existing configuration, use the Load button to bring its content inside the setup panel. Note that changes are not saved to disk until you explicitly choose ``Save`` from the Configuration area of the screen. Normally the script saves the new config.inc.php to the config/ directory, but if the webserver does not have the proper permissions you may see the error “Cannot load or save configuration.” Ensure that the config/ directory exists and has the proper permissions - or use the Download link to save the config file locally and upload it (via FTP or some similar means) to the proper location.
Once the file has been saved, it must be moved out of the config/ directory and the permissions must be reset, again as a security measure:
mv config/config.inc.php . # move file to current directory
chmod o-rw config.inc.php # remove world read and write permissions
rm -rf config # remove not needed directory
Now the file is ready to be used. You can choose to review or edit the file with your favorite editor, if you prefer to set some advanced options which the setup script does not provide.