How to install mysql php in centos7: first download and install mysql-server from the official website; then use the "systemctl start mysql" command to start mysql; then use the yum command to install php7; finally install and start php-fpm.
PHP Video Tutorial》
Official website download and install mysql-serverUse the following three commands to install in sequencewget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpmrpm -ivh mysql-community-release-el7-5.noarch.rpm yum install mysql-community-serverThe installation process is as shown below
systemctl start mysql command to start mysql
set the root account password Use the command set password for 'root'@' localhost' =password('password');
grant all privileges on *.* to root@'%'identified by 'password';If it is a new user instead of root, you must first create a new user
create user 'username'@'%' identified by 'password';Flush privileges
flush privileges;
Download php7
- Install php7
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
yum install php70w-fpm php70w-opcache
Start php-fpm
systemctl start php-fpmTest Whether php and php-fpm are installed successfully
- Create a new index.php in the nginx root directory with the following content
Access your web server and the following picture will appear, indicating that the installation is successful
The above is the detailed content of How to install mysql php on centos7. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version
