基於Apache+php+mysql的許願牆網站的搭建create database xyq; //建立xyq資料庫

來源:互聯網
上載者:User

標籤:

1。準備CentOS7與CentOS5的基礎配置

 

2.在兩台虛擬機器中配置yum。

 

3.在CentOS7中安裝httpd與php,在另一台虛擬機器中安裝mysql

yum install mysql-server -y    

 

service mysqld restart  重啟mysql

 

重啟成功

 

4.將許願牆網頁放入CentOS7的/var/www/html

 

5.輸入   mysql     進入資料庫進行管理

 

6.輸入create user ‘kbz‘@‘192.168.100.104‘ identified by ‘146397‘;    

給192.168.100.140建立使用者,PS。建立的使用者只能在192.168.100.104上登入。

 

 

7.create database naive;      建立naive資料庫        PS:mysql中結尾必須用;結尾

 

 

8。show databases;       查看mysql中的資料庫

 

9.grant all privileges on naive.* to ‘kbz‘@‘192.168.100.104‘;       給kbz加上許可權。PS:*代表所有的表

 

10.use navie;    進入到naive資料庫,並向中插入資料。

 

 

show tables;         查詢資料庫裡有那些表

PS:quit 退出mysql

 

11.進入CentOS7中的/var/www/html目錄,進入connect.php檔案

 

12.修改內容。。

 

13.在瀏覽器中輸入192.168.100.104進入許願牆

基於Apache+php+mysql的許願牆網站的搭建create database xyq; //建立xyq資料庫

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.