Create database Xyq based on Apache+php+mysql's wishing Wall website; Create a XYQ database

Source: Internet
Author: User
Tags mysql in

1. Prepare the basic configuration of CentOS7 and CentOS5

2. Configure Yum in both virtual machines.

3. Install httpd and PHP in CentOS7 and install MySQL in another virtual machine

Yum Install Mysql-server-y

Service mysqld Restart restart MySQL

Reboot successful

4. Put the Wishing Wall page into the CentOS7/var/www/html

5. Enter MySQL into the database for management

6. Enter create user ' kbz ' @ ' 192.168.100.104 ' identified by ' 146397 ';

Create a user for 192.168.100.140, PS. The created user can only log on to 192.168.100.104.

7.create database naive; Create naive database Ps:mysql The end must be used;

8.       show databases; View a database in MySQL

9.grant all privileges the naive.* to ' kbz ' @ ' 192.168.100.104 '; Add permissions to KBZ. ps:* represents all the tables

10.use Navie; Enter the naive database and insert data into it.

Show tables; There are tables in the query database.

Ps:quit quit MySQL

11. Enter the/var/www/html directory in the CentOS7 and enter the connect.php file

12. Modify the content:

13. Enter 192.168.100.104 into the wishing wall in the browser

Create database Xyq based on Apache+php+mysql's wishing Wall website;//creating XYQ databases

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.