centos6.4 under Installation Mysql+apache+php+phpmyadmin

Source: Internet
Author: User
Tags install php mysql in phpmyadmin

An Apache Installation

#yum Install httpd

Setting up Apache boot-up

# chkconfig httpd on

Restart Apache

#Service httpd Restart

The default document root directory for Apache is the/var/www/html directory on CentOS, and the configuration file is/etc/httpd/conf/httpd.conf. Configure the/etc/httpd/conf.d/directory that is stored in.

Two install PHP

#yum Install PHP

Restart

#/etc/init.d/httpd restart

We can install PHP5 and Apache PHP5 modules as follows:

The file root directory for the default Web site is in/var/www/html. Now we will create a small php file (info.php) in the directory to invoke it in the browser. The file will display a lot about our PHP installation, such as the installed PHP version and some useful details.

#vi/var/www/html/info.php

Three PHP to get MySQL support

#yum Search PHP

#yum Install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc

Restart Apache2:

#/etc/init.d/httpd restart

Reload the http://localhost/info.php in your browser and scroll down to the module section again. Now, you should find many new modules, including the MySQL module

Four-Mount phpMyAdmin

1. Download package URL: https://files.phpmyadmin.net/phpMyAdmin/2.11.11.3/phpmyadmin-2.11.11.3-all-languages.tar.gz/

2. Decompression

#tar XZVF phpmyadmin-2.11.11.3-all-languages.tar.gz

3. Move the file and name the file phpMyAdmin

#mv Phpmyadmin-2.11.11.3-all-languages/var/www/html/phpmyadmin

4. Locate phpmyadmin/libraries/config.default.php, copy the file to the phpMyAdmin directory and rename it to config.inc.php

#mv config.default.php/var/www/html/phpmyadmin/config.inc.php

5. Modify the config.inc.php file

#vim config.inc.php

$cfg [' pmaabsoluteuri '] = ' http://localhost/phpmyadmin ';
$cfg [' blowfish_secret '] = ' ABCD ';
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';
$cfg [' Servers '] [$i] [' password '] = ' root ';
Five start MySQL
MySQL boot command installed under/ETC/INIT.D

#service mysqld Start

Six View run phpMyAdmin

Make sure MySQL and Apache are running, open the browser, enter http://localhost/phpmyadmin/in it, and the phpMyAdmin Admin interface will open.

Question 1

Will $cfg [' Servers '] [$i] [' auth_type '] = ' cookie '; After setting, the $cfg [' blowfish_secret '] = ' abcd ' shall be set;

Question 2

Don't know the password after installing MySQL

To start MySQL in a safe manner:
#/usr/bin/mysqld_safe--skip-grant-tables >/dev/null 2>&1 &
Wait for 5 seconds, and then execute the following statement:
#/usr/bin/mysql-u Root MySQL
Note: MySQL is the same as the Mysql_safe directory:/usr/bin/, this is through the "Ps-ef | grep-i MySQL "command to get.
When the "mysql>" prompt appears, enter:
mysql> Update user Set password = password (' root ') where user = ' root ';
Enter after the execution (refresh the MySQL system permissions related tables):
mysql> flush Privileges;
Then execute exit exit:
Mysql> exit;

After exiting, use the following command to log in to MySQL and try to succeed:

#mysql-U root-p

Enter password as prompted: root

centos6.4 under Installation Mysql+apache+php+phpmyadmin

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.