Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > Windows Azure > Using Windows Azure Case Study (Move to VM - Windows) > ขั้นตอนที่ 5 : การติดตั้ง MySQL และสร้าง User สำหรับ MySQL บน Windows Server



Clound SSD Virtual Server

ขั้นตอนที่ 5 : การติดตั้ง MySQL และสร้าง User สำหรับ MySQL บน Windows Server

ขั้นตอนที่ 5 : การติดตั้ง MySQL และสร้าง User สำหรับ MySQL บน Windows Server ขั้นตอนนี้เป็นการติดตั้ง MySQL Database บนเครื่อง VM ของ Windows Server เพราะในเว็บไซต์ของไทยครีเอทใช้ Database ของ MySQL เฉพาะฉะนั้นจะต้องทำการติดตั้งให้เรียบร้อยก่อนถึงจะสามารถทำการ Import ฐานข้อมูลเข้าไปได้ โดยในบทความนี้จะอธิบายถึงขั้นตอนการติดตั้ง MySQL Database การสร้าง Database การสร้าง User การ Grant สิทธิ์สำหรับ User และก็สุดท้ายวิธีการ Import ข้อมูลลงใน MySQL

เนื่องจาก VM ที่ใช้ทำ Case Study บน Windows ซึ่งปกติแล้วเราจะคุ้นเคยกับการใช้งาน Windows ในการทำงานอยู่แล้ว เพราะฉะนั้นวิธีนี้จึงเป็นทางเลือกที่ง่ายและสะดวกมากในการที่จะใช้งาน

ภายใต้ VM บน Windows Azure

Windows Azure VM Windows Server MySQL

MySQL Community Server

ให้ทำการ Download ตัว Setup ของ MySQL ได้จาก URL นี้

Windows Azure VM Windows Server MySQL

เลือก Download !!

Windows Azure VM Windows Server MySQL

เลือก Version สำหรับ Windows Server

Windows Azure VM Windows Server MySQL

ในขั้นตอนการ Download จะมีให้ Login ซึ่งอาจจะต้องสมัครสมาชิกให้เรียบร้อยก่อน

Windows Azure VM Windows Server MySQL

เลือก Run

Windows Azure VM Windows Server MySQL

ใน MySQL จะมีการ Require ตัว .NET Framework ให้ติดตั้งให้เรียบร้อย

Microsoft .NET Framework 4 (Web Installer)









หลังจากเรียบร้อยแล้ว ให้ติดตั้ง MySQL ใหม่อีกครั้ง

Windows Azure VM Windows Server MySQL

เลือก Install

Windows Azure VM Windows Server MySQL

เลือก I accept the license teams และ Next

Windows Azure VM Windows Server MySQL

ขั้นตอนนี้อาจจะ Skip และเลือก Next เพื่อไปขั้นตอนถัดไป

Windows Azure VM Windows Server MySQL

ตรงนี้ให้เลือกแบบ Full เพระาจะได้ใช้ Tools อื่น ๆ ในกรณีที่จำเป็น

Windows Azure VM Windows Server MySQL

คลิกเลือก Execute

Windows Azure VM Windows Server MySQL

ให้ทำการติดตั้งโปรแกรมต่าง ๆ ที่โปรแกรมต้องการจนครบทุกตัว ด้วยการคลิกที่ Execute

Windows Azure VM Windows Server MySQL

จากนั้นให้เลือก Next

Windows Azure VM Windows Server MySQL

เลือก Execute

Windows Azure VM Windows Server MySQL

จากนั้นให้เลือก Next

Windows Azure VM Windows Server MySQL

ขั้นตนนี้ให้กำหนดรหัสผ่านของ root (จำไว้ด้วยครับ)

Windows Azure VM Windows Server MySQL

ชื่อ Service Name

Windows Azure VM Windows Server MySQL

จากนั้นก็จะติดตั้งเรียบร้อย

Windows Azure VM Windows Server MySQL

หลังจากที่ติดตั้งเรียบร้อยจะมี Tools ของ MySQL Workbench ซึ่งเราสามารถใช้ Tools นี้เพื่อเข้าไปจัดการกับ MySQL ได้

Windows Azure VM Windows Server MySQL

หรือจะใช้ผ่าน Command Prompt ก็ได้เช่นเดียวกัน ด้วยการเลือกที่ Start -> MySQL 5.6 Command Line Client








การสร้าง Database / User / และการ Grant สิทธิ์

Windows Azure VM Windows Server MySQL

หลังจากที่เปิด Command Propmt เรียบแล้วโปรแกรมจะถามหารหัสผ่านของ root

Windows Azure VM Windows Server MySQL

ให้สร้าง Database / User และ Grant ด้วยคำสั่งดังนี้

Windows Azure VM Windows Server MySQL

CREATE DATABASE IF NOT EXISTS thaicreate_2013;

CREATE USER 'thaicreate_user'@'localhost' IDENTIFIED BY 'thaicreate_password';

GRANT ALL PRIVILEGES ON thaicreate_2013.* TO 'thaicreate_user'@'localhost' WITH GRANT OPTION;


ซึ่งตอนนี้เราได้ Database = thaicreate_2013 และ User = thaicreate_user และ Password = thaicreate_password ซึ่งสามารถนำไปใช้กับเพื่อทำการ Import ตัว Database ของเราได้แล้ว

Windows Azure VM Windows Server MySQL

ปกติแล้วผมจะถนัดโปรแกรม phpMyAdmin ฉะนั้นจึงทำการ Upload ไฟล์ของ phpMyAdmin ไปยังบน VM

Windows Azure VM Windows Server MySQL

และเรียกใช้ phpMyAdmin บน VM ผ่าน URL รวมทั้งกรอก User/Password ที่ได้สร้างไว้ก่อนหน้านี้

Windows Azure VM Windows Server MySQL

จะเห็นว่าเรามี Database ชื่อว่า thaicreate_2013 ที่ได้สร้างไว้ก่อนหน้านี้

Windows Azure VM Windows Server MySQL

ให้ทำการ Import ข้อมูลปกติ

หลังจากที่ทำการติดตั้ง MySQL และ Import ฐานข้อมูลเรียบร้อยแล้ว เราก็เอาค่า Database/User/Password ไป Config ในโปรแกรม หลังจากนั้นเว็บเราก็จะสามารถเรียกใช้งานได้แล้ว

Windows Azure VM Windows Server MySQL

ตอนนี้เว็บไทยครีเอทสามารถรันบน VM ที่เป็น Windows Server เรียบร้อยแล้ว แต่ยังอยู่ในรูปแบบของ Subdomain ของ cloudapp.net และในขั้นตอนถัดไปเราจะมากำหนด Custom Domain เพื่อให้เรียกได้จากโดเมน www.thaicreate.com



บทความถัดไปที่แนะนำให้อ่าน

   
Share


ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2013-06-06 21:03:13 / 2017-03-24 16:55:13
  Download : No files
 Sponsored Links / Related

 
ขั้นตอนที่ 1 : การสร้าง VM ของ Windows Server บน VM - Windows Azure
Rating :

 
ขั้นตอนที่ 2 : การติดตั้ง IIS Web Server การสร้าง Endpoint เพื่อบริการ Web Server
Rating :

 
ขั้นตอนที่ 3 : การสร้าง Setup FTP Account และ FTP ไฟล์ไปที่ VM (Windows Server)
Rating :

 
ขั้นตอนที่ 4 : ติดตั้ง PHP สำหรับ IIS บน VM Windows Server ของ Windows Azure
Rating :

 
ขั้นตอนที่ 6 : การติดตั้ง SMTP บน VM Windows Server เพื่อใช้สำหรับส่งอีเมล์ด้วย PHP
Rating :

 
ขั้นตอนที่ 7 : การแก้ไข CNAME เกำหนด Custom Domain เพื่อใช้งานจริงบน VM
Rating :

 
ขั้นตอนที่ 8 : การตรวจสอบ Scale , Monitor และรายละเอียดค่าบริการอื่น ๆ
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่