官术网_书友最值得收藏!

Installing web access for MySQL

In this recipe, we will set up a well-known web-based MySQL administrative tool—phpMyAdmin.

Getting ready

You will need access to a root account or an account with sudo privileges.

You will need a web server set up to serve PHP contents.

How to do it…

Follow these steps to install web access for MySQL:

  1. Enable the mcrypt extension for PHP:
    $ sudo php5enmod mcrypt
    
  2. Install phpmyadmin with the following commands:
    $ sudo apt-get update
    $ sudo apt-get install phpmyadmin
    
  3. The installation process will download the necessary packages and then prompt you to configure phpmyadmin:
  4. Choose <yes> to proceed with the configuration process.
  5. Enter the MySQL admin account password on the next screen:
  6. Another screen will pop up; this time, you will be asked for the new password for the phpmyadmin user. Enter the new password and then confirm it on the next screen:
  7. Next, phpmyadmin will ask for web server selection:
  8. Once the installation completes, you can access phpMyAdmin at http://server-ip/phpmyadmin. Use your admin login credentials on the login screen. The phpmyadmin screen will look something like this:

How it works…

PHPMyAdmin is a web-based administrative console for MySQL. It is developed in PHP and works with a web server such as Apache to serve web access. With PHPMyAdmin, you can do database tasks such as create databases and tables; select, insert, update data; modify table definitions; and a lot more. It provides a query console which can be used to type in custom queries and execute them from same screen.

With the addition of the Ubuntu software repository, it has become easy to install PHPMyAdmin with a single command. Once it is installed, a new user is created on the MySQL server. It also supports connecting to multiple servers. You can find all configuration files located in the /etc/phpmyadmin directory.

There’s more…

If you want to install the latest version of phpMyAdmin, you can download it from their official website, https://www.phpmyadmin.net/downloads/. You can extract downloaded contents to your web directory and set MySQL credentials in the config.inc.php file.

See also

主站蜘蛛池模板: 怀仁县| 泊头市| 麦盖提县| 哈密市| 白朗县| 东兰县| 岳西县| 元江| 潍坊市| 新和县| 泗阳县| 茶陵县| 莫力| 嘉鱼县| 北川| 福鼎市| 遂宁市| 泽库县| 武川县| 柳州市| 裕民县| 盐池县| 禄劝| 西平县| 北碚区| 兴和县| 祥云县| 邛崃市| 怀化市| 于都县| 进贤县| 乌鲁木齐县| 华安县| 山阴县| 尖扎县| 日土县| 商河县| 高碑店市| 东乌| 彭泽县| 布尔津县|