001、XAMPP網站服務軟體安裝及設定

0、下載純文字書寫軟體Sublime

1、XAMPP下載及安裝

下載XAMPP Windows版本的1.81版本:

2、啟動Apache網站服務,和MySQL資料庫服務

date.timezone = Asia/Taipei
完成後,儲存檔案,重新啟動Apache服務

 

檔案路徑:C:\xampp\phpmyadmin\config.inc.php

找到下列一行,將 config 改成 http
$cfg['Servers'][$i]['auth_type'] = 'http';
代表用輸入帳號及密碼的方式來登入網頁

完成後,儲存檔案,重新啟動Apache

測試資料庫管理網頁,網址:
http://localhost/phpmyadmin/

3、設定MySQL資料庫登入密碼

指令:cd c:\xampp\mysql\bin

切換到bin目錄:
C:\Users\USER>cd c:\xampp\mysql\bin
c:\xampp\mysql\bin>

指令:mysqladmin -u root -p password "123456"

設定密碼為123456,輸入指令如下:
c:\xampp\mysql\bin>mysqladmin -u root -p password "123456"
因為安裝好密碼為空,所以按二次Enter完成即可設定密碼為123456

指令:mysql -u root -p

可以測試登入mysql資料庫如下:
c:\xampp\mysql\bin>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 29
Server version: 5.5.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
    

 

指令:show databases;

輸入指令查詢所有資料庫:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cdcol              |
| childrenclass      |
| mysql              |
| performance_schema |
| phpmyadmin         |
| test               |
| webauth            |
| yuanyuhome_db      |
+--------------------+
9 rows in set (0.00 sec)

mysql> exit;
    

4、將網頁根目錄 htdocs 檔案內容清空刪除

shape
shape