การติดตั้ง SMEShop 2.0 จำเป็นต้องกรอก Username/Password ของ Database ด้วย มีบางท่านนำ SMEShop 2.0 ไปติดตั้งบน XAMPP โดยที่ไม่ได้ตั้งค่า Password ให้กับ MySQL/MariaDB ก่อน (ค่า Default ของ XAMPP จะไม่ได้ตั้งค่า Password เอาไว้)
การตั้งค่า Root Password
1. เปิดหน้าต่าง XAMPP Control Panel ขึ้นมา แน่ใจว่าได้สั่ง Start MySQL ไว้แล้ว
2. เปิดหน้าต่าง Windows command โดยคลิกที่ปุ่ม Shell (ตามภาพบน)
3. พิมพ์คำสั่งดังนี้
# mysqladmin --user=root password "gue55me" <กดปุ่ม Enter>
ตัวอย่างข้างต้นเป็นการตั้งค่ำ Password = gue55me
4. ทดสอบการตั้งค่า Password โดยพิมพ์คำสั่งนี้
mysql --user=root --password=gue55me -e "SELECT 1+1"
จะได้ผลลัพธ์ตามภาพนี้ ถ้าผิดไปจากนี้แสดงว่าการตั้งค่า Password ไม่สำเร็จ ให้ตั้งค่าใหม่อีกครั้งตามข้อ 3
5. ปิดหน้าต่าง Shell กลับไปที่หน้าต่าง XAMPP Control Panel
6. ให้ทำการ Stop Apache และ Stop MySQL
7. คลิปปุ่ม Config หลัง Apache เลือก PHPMyAdmin (config.inc.php) ตั้งค่าตามนี้
/* Authentication type and info */ $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'gue55me'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = true; $cfg['Lang'] = '';
8. บันทึกไฟล์ แล้ว Start Apache และ Start MySQL
9. เข้า localhost/phpmyadmin add new database
10. เข้า localhost/yourshop/install.php
|