การปรับโค้ดซีชาร์ปกับเอเอสพีดอทเน็ต

เมื่อวานนั่งแก้โค้ดเก่า
ที่เคยทำงานบนวินเซิร์ฟศูนย์แปด
ให้ทำงานบนรุ่นสองศูนย์สิบหก
เพราะเพื่อนเก่ารุ่นน้องเค้าทักถามมา
เค้าใช้เอเอสพีดอทเน็ตกับซีชาร์ป
ทีแรกคิดว่าเป็นเอเอสพีคลาสสิก
พอได้เห็นโค้ดถึงรู้ว่าฟอร์มหลัก
ใช้เอเอสพีดอทเน็ต และ
โค้ดใช้ซีชาร์ปควบคุมการติดต่อ
และเชื่อมฐานเอสคิวแอลเซิร์ฟเวอร์
.
พอดีเช่าโฮสต์
ที่เป็นวินโดว์ไว้ตัวหนึ่ง
เคยทำระบบสมาชิกให้สมาคม
ตอนนั้นใช้แอคเซสรุ่นเก่าเก็บข้อมูล
พอมีกฎเรื่องความเป็นส่วนตัว
ก็ได้หยุดบริการลงไป
เหลือเพียงบล็อกข้อมูล
ที่ใช้ฐานข้อมูลมายเอสคิวแอล
.
เมื่อได้นำโค้ดมารัน
พบว่า นโยบายการเขียนโค้ด
เปลี่ยนไปในเครื่องรุ่นสองศูนย์สิบหก
รูปแบบเดิมใช้ไม่ได้เยอะทีเดียว
ทำให้ต้องแก้โค้ดอยู่พอควร
.
การเปลี่ยนที่สำคัญ เช่น
คำสั่งในเอเอสพีดอทเน็ต
เป็น case sensitive แล้ว
การเขียนและเรียกใช้คลาส
ต้องอยู่ในแฟ้มซีชาร์ปเดียวกัน
จะแบ่งคลาสไปเขียนแยกแฟ้ม
แล้วมีตัวหลักเรียกมารวมกันไม่ได้
และการสั่ง response หรือแสดงผล
ทำไม่ได้ในกรณีที่เป็นเว็บแอป
ในโค้ดนี้ใช้การส่งค่ากลับมาที่ฟอร์ม
ผ่านตัวแปรแบบ cookie
.
ตัวอย่างนี้เน้นทดสอบการเชื่อมต่อ
แบบ ole กับ mysql
และการทำงานแบบ User interface
ของฟอร์มหลัก
หากจะทดสอบโค้ดต้องมี
โฮสต์ ฐานข้อมูล ผู้ใช้และรหัส
ขอให้โชคดีกับการทดสอบเชื่อมต่อครับ
.
เคยเขียนบทเรียนออนไลน์
เรื่องเอเอสพีคลาสสิก
เอเอสพีดอทเน็ต และซีชาร์ป
รวมถึงหนังสือรวมโค้ดเล่มหนึ่ง
ถ้ามีโอกาสก็จะไปปรับโค้ด
ให้เป็นปัจจุบันยิ่งขึ้น

C#
ASP.Net

https://fb.watch/q2Jwj_qIzJ/

ปรับแก้ config ระบบ wamp ของ thaiabc80 ให้ mysql กลับมาทำงาน

เล่า 2 เรื่อง ให้ลูกศิษย์ 2 รุ่นได้ฟังก่อนจบ
ดูฤกษ์แล้ว วันนี้ 17 กุมภาพันธ์ 2564 ติดตั้ง “โปรแกรมแก้วสารพัดนึก” อีกครั้ง (thaiabc80) โดยมีความเชื่อว่าน่าจะยังใช้งานได้บน win 10 หลังจากที่เคยปล่อยรุ่นสุดท้ายเมื่อ 7 พฤษภาคม 2555 (หยุดพัฒนาไปเกือบ 10 ปี) ซึ่งใช้มีโปรแกรมตัวหลัก คือ Apache 2.0.52 , PHP 5.2.5 , MySQL 5.5.16 พบว่า การติดตั้งราบรื่นด้วยดี เพียงกด next อย่างเดียว ก็จะได้แฟ้มทั้งหมดใน thaiabc บน drive c หลังติดตั้งเสร็จ ได้สั่ง start ทั้ง apache และ mysql ผ่าน icon บน desktop แล้วเปิดระบบโปรแกรมต่าง ๆ ทั้ง 12 โปรแกรม ผ่าน 127.0.0.1 บน browser ผลลัพธ์ผิดจากที่คาดไว้เยอะ คือ ล้มทุกตัว ดูแล้วน่าจะเป็นเพราะ mysql ไม่ start แต่ตรวจสอบแล้ว mysql ก็ start ได้ปกตินี่นา เพราะสั่งแสดงรายชื่อ database ได้ครบถ้วน ผ่าน command line ซึ่งเป็นการทำงานแยกส่วนกับ web server จึงใช้คำสั่งบนดอสสั่งตรวจสอบ module ด้วย php -m พบว่าขึ้น Warning หลายรายการ หนึ่งในนั้นได้พยายามเรียกใช้ php_mysql.dll จาก c:\windows\ext จึงเข้าไปตรวจสอบ php.ini ว่าเรียก php_mysql.dll ถูกต้องหรือไม่ ก็พบว่ากำหนด extension_dir ให้ชี้ไปยังห้อง windows แต่ระบบไม่ได้คัดลอกแฟ้ม extension ทั้งหมดไปไว้ในห้องนั้น จึงแก้ไขให้ extension_dir ชี้ไปที่ c:\thaiabc\php\ext ซึ่งเป็น folder ที่เก็บแฟ้ม module ทั้งหมด หลังจากนั้นระบบทั้ง 12 ระบบก็ตื่นขึ้น แต่ทดสอบบน win8.1 พบว่า phpmyadmin ถูกเรียกใช้ได้ปกติ ส่วนบน win10 มีปัญหาเรื่องค่า session ทำให้เปิด phpmyadmin ไม่ได้ จึงต้องไปเพิ่ม “c:\thaiabc\apahce2\error” ให้กับตัวแปร session_save_path ใน php.ini ซึ่งระบบทั้ง 12 ประกอบด้วย

  1. moodle
  2. moodle19
  3. learnsquare v2
  4. mambo
  5. oscommerce
  6. wordpress
  7. drupal
  8. calendar
  9. phpicalendar
  10. phpbb3
  11. senayan3
  12. phpmyadmin

ที่มารื้อฟื้นโปรแกรมแก้วสารพัดนึก มาติดตั้งใหม่ในวันนี้ เพราะไปเล่าให้ลูกศิษย์ฟัง จึงต้องกลับมาตรวจสอบว่ารุ่น 8.0 นั้น ยังทำงานได้บน win10 หรือไม่ และติดพันกับการอ่านข้อเสนอโครงงานของลูกศิษย์สาว 2 คนที่ไปฝึกงานที่โรงพยาบาล เค้าสนใจใช้อุปกรณ์ IoT วัดอุณหภูมิในตู้เก็บของ ทำให้นึกถึง Nodemcu Esp8266 ที่บันทึกและส่งค่าอุณหภูมิ ขึ้นไปยัง thingspeak.com เพื่อแสดงรายงาน และเชื่อมกับ IFTTT.com เพื่อส่งข้อมูลไปแจ้งเตือนบน Line ซึ่งสรุปได้ว่า ชีวิตคือการเรียนรู้

https://www.mathworks.com/help/thingspeak/use-ifttt-to-send-text-message-notification.html

https://www.ab.in.th/article/36/

#เล่าสู่กันฟัง 63-032 ฐานข้อมูลต่างรุ่น

ผู้ให้บริการแต่ละราย ให้บริการเครื่องโฮส
ที่มีภาษา และฐานข้อมูลต่างรุ่นกันไป
บางเครื่องมีภาษาให้เลือกเปลี่ยนได้ง่าย
บางเครื่องมีฐานให้เลือกติดตั้ง
แต่เปลี่ยนหลังติดตั้งไปมาไม่ได้

ภาพตัวอย่างพูดถึงรุ่นของ mysql
ระหว่าง 5.5.30 และ 5.6
ที่บางระบบกำหนดฐาน รุ่น 5 ไว้ให้
ปัจจุบันพัฒนาไปถึง Mariadb 10.5 กับ Mysql 8
แต่เครื่องที่ผมมีใช้ 5.0.12 กับ php7
ที่ http://www.thaiall.com/moodle

เครื่องที่ใช้คือแชร์เครื่อง
ไม่ใช่เครื่องที่ติดตั้ง xampp หรือ appserv

มีโปรแกรมเก่า wp ที่ถูกบังคับเปลี่ยน
ให้ใช้ภาษารุ่น 7 ทำงานกับฐานรุ่น 5 ได้
แต่กับ moodle ไม่ได้ออกแบบให้ทำกับ
ฐานรุ่น 5 ต้องแก้ไข code
ทั้ง deprecated และ constructor
แล้วก็ไปเล่าเรื่องการเปลี่ยน script
ที่ http://www.thaiall.com/php/php7.htm

ถ้ามีโอกาสก็จะเล่าเรื่อง glossary
บน moodle
ใน http://www.thaiall.com/e-learning

พูดคุยแลกเปลี่ยนใน github

อ้างอิง
https://en.m.wikipedia.org/wiki/MySQL

https://en.m.wikipedia.org/wiki/MariaDB

https://www.000webhost.com/forum/t/mysql-version-with-pro-and-free-hosting/61652

ทดสอบ Free web hosting ที่บริการ PHP กับ MySQL มาหนึ่งโหล

อันที่จริงชีวิตคนไอทีเช่นผม ก็เริ่มต้นจากการใช้บริการ Free web hosting นี่หละ
เริ่มแรกเลยก็ geocities.com จากนั้นก็ขยับขึ้นไปบน Server
ที่บริการ Server-Side Script ไม่ใช่ Static web page อีกต่อไป
ไปใช้ บริการ Database Server บริการ PHP บ้าง ASP บ้าง
แล้วแต่อารมณ์จะพาไปหาในแต่ละช่วงชีวิต
ขอสารภาพเลยว่า ตัวหนึ่งที่เช่าใช้อยู่ทุกวันนี้ ก็เริ่มต้นจากการใช้ของเขาฟรี
แล้วติดใจ จึงยอมจ่ายตังมาจนถึงทุกวันนี้

เข้าเรื่องเลย เหตุเกิดว่าผมต้องคุยกับ น.ศ. เรื่องการเขียน Server-Side Script
พอยกกรณีศึกษา หรือ Sample code ก็ต้องหาที่ให้เค้าลอง
ต้องบริการ PHP + MySQL + Free + No Domain
จะให้ใช้ XAMPP่, Appserv, Thaiabc หรือ Localhost อยู่บ้าน นั่นต้องทำอยู่แล้ว
แต่ให้ดีต้อง Online
ครั้งจะ Upload ไป Run ที่เครื่องของผมที่เปิดรอท่า ก็ดูกะไรอยู่
จึงให้ไปสมัครใช้ฟรีกับเหล่า Free web hosting ผมตั้งเงื่อนไขให้เค้าสมัครใช้คนละ 2 ตัว

ปีนี้ 2017 หากจะให้เล่าถึง Server สมัยผม ก็คงล้มหายตายจากกันไปหมดแล้ว
ไปค้นเน็ตเจอที่ Desire Athow เขียนเมื่อ June 18, 2017
ว่ามี Free hosting สำหรับ Business ที่เป็น Best ถึง 10 sites
ผมก็ไม่รอช้า มี Reference แล้วก็หยิบมาเลย ทดสอบเรียงตัวเลย
http://www.techradar.com/…/top-free-hosting-for-businesses

ตัวแรก ueuo.com
ตัวนี้ไม่ได้อยู่ใน 10 Best นะครับ
แต่เป็นตัวที่ผมวาง Sample code เมื่อหลายปีก่อน และ Active อยู่
กลับไปทดสอบสมัคร เพราะผมใช้อยู่ก็จะแนะนำให้ น.ศ. ไปสมัครด้วย
ที่หน้าสมัครพบประกาศว่า
บริการ php 5.4 และ mysql 5.5 สำหรับ All free account
ใน ueuo.com หากจะ create an account
ต้องเข้าไปที่ freewebhostingarea.com
เข้าไปตาม Link เค้าก็ให้สมัคร
ไปจนถึงสร้าง account แบบ Free subdomain Hosting
เช่น www.thaiabc.ueuo.com แล้วกด proceed ก็จบเลยครับ
จบตรงข้อความที่ว่า
Public registration was temporarily disabled!
If you need an account, please contact us using register@freewha.com
ต่อจากนี้ก็จะทดสอบ 10 sites ตามข้อมูลที่ Desire Athow แนะนำ

ของฟรี ของดี มีในโลกไซเบอร์
ของฟรี ของดี มีในโลกไซเบอร์

1) http://www.000webhost.com/
สรุปว่าสามารถสมัครได้ มีบัญชี คือ https://thaiabc.000webhostapp.com
เริ่มจากเข้าไปแล้วพบอะไรน่าคลิ๊กไปหมด
สมัครเสร็จก็ต้องไปรอ Email confirmation required
หลัง Verify email แล้วกดปุ่ม Manage website “thaiabc”
พบบริการ 6 รายการ 1) Build website 2) Set web address 3) File manager 4) Manage database 5) Manage emails 6) Settings
เริ่มต้นก็กด Build website
พบบริการ 3 รายการ 1) Build a website easily 2) build WordPress website 3) Upload Own Website
เนื่องจากผมมีแฟ้ม .php ที่เตรียมทำงานกับ mysql จึงเลือกข้อ 3) Upload Own Website
เข้าหน้า files ที่คล้ายกับ Windows Explorer ที่แสดง Folder ด้านซ้าย มีรายการแฟ้มด้านขวา
พบห้อง /public_html เลือก Upload files แล้วก็ upload แฟ้ม .php ที่เตรียมไว้
แต่ยังทดสอบไม่ได้ เพราะต้องกำหนดเรื่อง Database ในแฟ้ม .php ก่อน
กลับไปเข้า 4) Manage database พบว่าเค้าให้ได้สูงสุด 2 Database
มี Default database engine: InnoDB on MariaDB 10.1
เข้าจัดการผ่าน database.000webhost.com และใช้ localhost เป็น hostname
แล้วสั่ง New Database
กรอก Database name, Database username, Password
หลังจัดการ Database เสร็จก็นำข้อมูลไปกรอกในแฟ้ม .php
แล้ว upload แฟ้ม .php เข้าไปใหม่
ผลการทดสอบ Sample code ผ่านด้วยดี
หลังปรับแก้การเชื่อมต่อ MySQL แบบเดิม เป็น MySQLi
เพราะ Server บริการ PHP 7.1.7 และทุกตัวที่บริการก็ให้บริการ PHP 7 ขึ้นไปกันหมด

2) http://www.freehostia.com/
หน้าตาเรียบง่ายดี มุมบนขวาเห็นคำว่า SIGN UP NOW FOR FREE ???
ในขั้นตอนต่อไป จำเป็นต้องมี Domain Name ติดตัวไปสมัครด้วย ถ้าไม่มีก็ไม่ได้ไปต่อ
สรุปว่า ต้องมี Domain name จึงจะสมัครได้

3) http://www.5gbfree.com/hosting-plans/
คลิ๊ก Signup Now จากนั้นก็กรอกข้อมูล แล้วกด Create Accout
แล้วไปทำ Verification ผ่าน link ใน email
พบรหัสผ่านใน email และข้อมูลต่าง ๆ
สำหรับ email จากที่นี่ ถ้าไม่พบใน inbox อาจไปอยู่ใน spam ได้นะครับ
วิธีเข้า cPanel เช่น http://thaiabc.5gbfree.com:xxxx/
มองหา Database พบ MySQL Databases ก็คลิ๊กเข้าไป
จากนั้นกด New Database, Add New User
จากนั้นกด Add ในหัวข้อ Add User to Database
แล้ว Manage User Privileges เลือก ALL PRIVILEGES แล้ว Make Changes
กลับออกไป cPanel เข้า File Manger
เข้า public_html แล้วคลิ๊ก Upload ส่งแฟ้ม .php ที่กำหนด DB แล้วเข้าไป
ขณะทดสอบพบปัญหาการไม่บริการ iconv ก็ตรวจสอบ แล้วปรับ code ใหม่
ผลการทดสอบ Sample code ผ่านด้วยดี

4) http://www.freehosting.com/client/cart.php
เข้าไปก็เลือกแบบ Free Hosting กด Order Now
เค้าว่าจะได้พื้นที่ 10 GB กับ 1 MySQL database แต่พบปัญหา
สรุปว่า ต้องมี Domain name จึงจะสมัครได้

5) http://www.zymic.com/
วันนี้เข้าแล้ว too long to respond ครับ
มีข้อมูลล่าสุดใน archive.org เมื่อมกราคม 2017
https://web.archive.org/web/20170111154733/http://www.zymic.com/

6) http://byet.host/free-hosting
กดปุ่ม Sign up for a plan ที่อยู่ด้านล่าง
กรอกข้อมูลแล้วกด Register แล้วไปกด activate ใน email
ไปตรวจใน Spam box ก็จะพบอีเมลจากผู้ให้บริการ
หลัง activate ระบบจะสร้าง user เพื่อเข้า control panel, mysql, ftp
ใน Control Panel คลิ๊ก MySQL Database แล้วสร้าง Database
เค้าระบุ Hostname จะใช้ localhost ไม่ได้ และมี phpmyadmin ให้ใช้
ได้ข้อมูลเข้าไปปรับแฟ้ม .php
กลับมาเลือก Online File Manager แล้วเข้า htdocs
กดปุ่ม upload, choose file แล้วคลิ๊กที่เครื่องหมายถูก เพื่อ submit
ผลการทดสอบ Sample code ผ่านด้วยดี

7) https://www.awardspace.com/free-hosting/
เข้าไปก็กรอก e-mail และ password แล้วกด Join Awardspace
แล้วไป click link to confirmation ใน email
จากนั้นเข้า Dashboard มีทุกอย่างที่ต้องการ
คลิ๊ก Database Manager
กรอก Database name และ password แล้วกด Create database
ส่วน DB user name เค้าให้เป็นชื่อเดียวกกับ Database name
แล้วให้ Host name มาด้วย ต้องใช้ของเค้า
กลับไปที่ Dashboard ครั้งนี้คลิก Domain Manager
คลิ๊ก Create a Free Subdomain พิมพ์ thaiabc หน้า atwebpages.com
แล้วกด Create พอสร้างเสร็จก็กด Open Website
http://thaiabc.atwebpages.com/
กลับไปที่ Dashboard คลิ๊ก File Manager
ก่อนหน้านี้เข้าไปแล้วว่าง ตอนนี้เข้าไปพบ Folder : thaiabc.atwebpages.com
ไป double click เพื่อเข้าไป
กด Upload เลือกแฟ้ม .php แล้วกด Upload เป็นอันเรียบร้อย
ผลการทดสอบ Sample code ผ่านด้วยดี

8) http://www.freehostingeu.com/web-hosting-page.php
ใน column Free plan กด Sign up
พบ New signups are temporarily disabled
สรุปว่าปิดบริการสำหรับผู้ใช้บริการรายใหม่ชั่วคราว

9) http://www.uhostfull.com/free-hosting.php
มีปุ่ม Sign Up! อยู่ข้างล่าง คลิ๊กเลย
มีให้กรอกเพียบ นับได้ 13 ช่อง รวม captcha
แล้วก็เข้า email จะไปทำ Activation แต่ไม่พบอีเมล
ทำ Resend Activation Email ใน http://cpanel.uhostfull.com/profile
กดแล้วก็ยังไม่ได้รับอีเมล รอแล้วก็ยังไม่เห็นมาเลย

10) http://freehostingnoads.net/webhosting.php
มีปุ่ม Signup Now อยู่ข้างล่าง คลิ๊กเลย
แล้วคลิ๊กปุ่ม If you want free limited hosting, please click here…
ตอนกรอกข้อมูลหน้าตาเหมือน http://www.uhostfull.com
และปัญหาเหมือนกันเลยด้วย
คือเข้า email จะไปทำ Activation แต่ไม่พบอีเมล
ทำ Resend Activation Email
กดแล้วก็ยังไม่ได้รับอีเมล รอแล้วก็ยังไม่เห็นมาเลย

สรุปว่าผลการทดสอบสมัครใช้ host ฟรี ตามคำแนะนำ
ของ Desire Athow ใน techradar.com เรื่อง Best free hosting
ได้มาหลังทดสอบจำนวน 4 host ตามรายละเอียดด้านบน
มองใกล้ตัวหน่อยก็เห็น Smart phone ของผมเป็น android
จึงติดตั้ง App: Palapa web server แล้ว Start service
จากนั้นก็ไปคัดลอก code จาก
http://www.thaiall.com/perlphpasp/source.pl?9116
วางไปบน App: DroidEdit Free แล้ว save as .php
เข้าห้อง /sdcard/pws/www
แล้วเรียกผ่าน chrome ว่า http://127.0.0.1:8080/hello.php
สรุปว่า Palapa web server เป็น host ตัวที่ 12 ที่ทดสอบครับ

ขอจบการเล่าเรื่อง 12 host แต่เพียงเท่านี้

#windows ตอนที่ 1 ใช้ Web Platform Installer ติดตั้ง PHP + MySQL บน IIS ง่ายล่ะชีวิต

#windows ตอนที่ 1 การแสดงคำว่า Hello World ใน Windows
จากข้อมูลใน MySQL บน IIS

การติดตั้ง IIS 8.5 + Web Platform Installer 5.0 +
PHP5.6.31 + MySQL 5.1 + PHPMyAdmin 4.0.10.20

<introduction>
สวัสดีชาวโลก หรือ Hello World!” ซึ่งผมมีโจทย์ว่า “ต้องการแสดงข้อมูลที่เก็บไว้ใน Database บน Windows ผ่านบริการของ Web Server ต้องทำอย่างไร” ก็มีหลายทางเลือก และต้องใช้กันหลายโปรแกรมเข้ามาช่วยทำให้บริการเหล่านี้เป็นจริืงได้ การทดสอบของผมใช้ Remote Desktop และ VNC ในการเข้า Web Server ก็ได้ความช่วยเหลือจาก คุณเบนซ์ ช่วยดูเรื่องเครือข่าย เปิดให้ผมเข้าจากที่บ้านได้ แล้ว คุณเปรม ก็ช่วยทำให้มี IP จริง เชื่อมกับ Intranet IP ในที่ทำงาน ผ่านการ config ใน Firewall ขอขอบคุณฝ่ายไอทีทั้งสองท่าน น้าาาา

เดี๋ยวนี้ เทคโนโลยีพัฒนาไปเร็วมาก การจะติดตั้ง Web Server (Port 80) และ Database (Port 3306) ก็ไม่ยากที่จะทำแล้ว จะเข้าถึงบริการเหล่านี้ได้ง่าย เพียง click หรือ double click ไม่กี่ที สิ่งสำคัญคือ ผู้สนใจก็เพียงแต่หาอ่าน (read) สิ่งที่ Windows เค้ามีมาให้ (Services) ไม่มีในเครื่อง ก็ไปหา Download แล้วก็ไซร้ (Search) เข้าไปตามความสนใจ ลงลึกไปเรื่อย ๆ ถ้าสนใจซะอย่าง อะไรอะไร ก็ไม่ยาก เพราะอยู่ตรงหน้า หรือหา download ได้อยู่แล้ว

โปรแกรมบน Windows ที่ใช้ ประกอบด้วยดังนี้

  1. IIS 8.5 on Microsoft Windows
  2. Web Platform Installer 5.0
  3. PHP 5.6.31
  4. MySQL 5.1
  5. PHPMyAdmin 4.0.10.20 [4.7.3]
  6. Chrome Browser

</introduction>

<process>
มีขั้นตอนการติดตั้ง และเขียนโปรแกรม ดังนี้

  1. โปรแกรม Remote Desktop เป็นบริการที่มากับ Windows
    ทำให้เราเข้าไปควบคุมจากระยะไกล เป็นที่นิยมกว่าโปรแกรมอื่น (สำหรับผมนะ)
    เพราะโปรแกรมนี้เป็นของ Windows อยู่แล้ว ใช้งานง่าย ไม่ซับซ้อน

    00_remote_desktop.png
    
  2. โปรแกรม VNC เป็นบริการที่ คุณเบนซ์ แนะนำ
    ว่าใช้งานแทน Remote Desktop ทำให้เข้าเครื่องที่ทำงาน
    ขณะนั่งอยู่ที่บ้าน (Work at Home) ความสามารถคล้ายกัน แต่ตัวนี้มีรุ่นทดลอง 30 วัน

    00_vnc.png
    
  3. เราตรวจสอบข้อมูลได้ว่าในเครื่องคอมพิวเตอร์ของเรา
    ปัจจุบันใช้ OS : Windows รุ่นอะไร
    มี RAM เท่าไร ดูใน System เมื่อเข้าผ่าน Control Panel
    นับว่าสิ่งที่ผู้ใช้ Windows ทุกคนคุ้นเคย เพราะอะไรอะไร ก็ต้องเข้าแผงควบคุม

    00_win81_64.png
    
  4. การคลิ๊กที่ปุ่ม Windows หรือปุ่ม Start เดิม
    ถ้า Click ก็จะแสดง Metro UI (User Interface)
    ถ้า Right Click ก็จะแสดงรายการ ที่ต้องใช้บ่อย เริ่มจาก Program and Features

    01_start_by_click.png
    
  5. การเข้า Control Panel
    สามารถเข้าผ่าน Right click ที่ปุ่ม Windows หรือ Windows-X แล้วมองขึ้นไป
    หรือพิมพ์ Control Panel ในช่อง Run หลังกด Windows-R

    02_control_panel.png
    
  6. เครื่องมือบริหาร ก็จะมีอะไรให้บริหารมากมาย
    ผมทราบมาว่าในนี้ต้องมี IIS คือ Web Server ของ Windows
    แต่ไม่พบ ก็ไม่แปลก เพราะเค้าไม่ได้ติดตั้งมาให้แต่แรก
    จึงต้องไปหามาลงแล้ว มีแหล่งเก็บของ Windows ที่มี แต่ยังไม่ได้ลง

    03_administrative_tools.png
  7. ใน Control Panel จะมี Program and Features
    และด้านซ้ายจะพบ Turn Windows Features on or off
    ให้คลิ๊กเข้าไป เพื่อเปิด Feature IIS ให้ทำงาน

    04_program_and_features.png
  8. ไม่เห็นคำว่า IIS แต่เห็น Internet Information Services
    ก็คลิ๊ก Check เพื่อบอกว่าขอให้ติดตั้ง IIS ให้ด้วย
    ก็จะมีรายละเอียดโปรแกรมอีกมา ที่เราจะได้มากับ IIS หรือไม่ได้มาด้วย
    ถ้าไม่คลิ๊กบริการย่อย เค้าก็ติดตั้งเฉพาะ Web Server ซึ่งเป็นบริการที่ผมมองหา
    แต่บริการ FTP Server จะไม่มาด้วย อยากได้ต้องคลิ๊ก Check นะครับ
    เห็นใช่ไหมว่า FTP Server ยังไม่ถูกคลิ๊ก

    05_windows_feature_iis.png
  9. เมื่อติดตั้งโปรแกรม IIS เสร็จแล้ว
    เมื่อเข้า Administrative Tools อีกครั้ง
    จะพบกับ Internet Information Services (IIS) Manager

    06_administrative_tools_iis.png
  10. เมื่อเข้าไปคลิ๊กถึง Default Web Site
    จะพบว่าบริการถูก Start คือ พร้อมให้บริการ เป็น Web Server

    07_iis_start.png
  11. กลับไปที่ Desktop หา Web Browser
    แล้วเปิด http://localhost

    08_localhost.png
  12. ในเครื่องคอมพิวเตอร์ของเราน่าจะลง Web Browser ไว้หลายตัว
    ชื่อเรียกเครื่องก็มีหลายแบบ อาจเรียกว่า localhost
    เป็น local ip ก็ 127.0.0.1 หรือ ip จริงของเครื่องก็ได้ หรือชื่อ host ก็ได้อีก
    ลองเรียกว่า http://127.0.0.1 ก็ได้ครับ

    09_127001.png
  13. ถ้าใช้ Winddows อยู่แล้ว Microsoft มีโปรแกรม Web Platform Installer
    แต่เตรียมโปรแกรมไว้มากทีเดียว ทำให้เราสั่งติดตั้งโปรแกรมในรายการ
    แล้วใช้งานได้ทันที ไม่ต้องไปทำ configuration เอง แบบ manual
    เริ่มต้นก็ไปดาวน์โหลดมาติดตั้งในเครื่องของเราก่อน ฟรีครับ

    10_web_platform_installer.png
  14. ขณะดาวน์โหลด หรือติดตั้งก็รอแป๊ปนึง
    โปรแกรมไม่ใหญ่มาก แต่จะไปช้าอีกครั้งตอนติดตั้ง
    โปรแกรมย่อยที่เราเลือกในภายหลัง

    11_install_web_platform_5.png
  15. มองหาคำว่า Products ด้านบน
    แล้วก็เลื่อนหาโปรแกรมที่เราสนใจ กรณีนี้ ผมสนใจภาษา PHP
    ซึ่งเป็น Server Sided Script ทำงานร่วมกับ IIS
    เมื่อเจอ PHP 5.6.31 ก็คลิ๊ก Add และ Install ด้านล่าง

    12_install_php5631.png
  16. แม้จะเลือก PHP มาตัวเดียว แต่ระบบตรวจสอบว่าต้องลงโปรแกรมใดเพิ่ม
    เค้าเรียก Prerequisites เหมือนตอนเรียนหนังสือ
    จะลงวิชา Project ของปี 4 ต้องลงวิชาของปี 1 ก่อน เป็น pre กันอยู่

    13_download_php5631.png
  17. จากนั้นก็รอ มี 2 progress bar คือ Download กับ Install
    โปรแกรมไม่ใหญ่ก็รอแป๊ปเดียว ขึ้นกับความเร็วเน็ตด้วย

    14_download_and_install_php5631.png
  18. พอลงโปรแกรมเสร็จแล้ว
    ก็จะมีรายงานว่าลงโปรแกรมอะไรไปแล้วบ้าง
    อย่างที่เห็นผมเลือก PHP 5.6.31 ตัวเดียว แต่ชวนเพื่อนมาเพียบเลย

    15_iis_php_finish.png
  19. โปรแกรม IIS มี Root Directory อยู่ที่ C:\Inetpub\wwwroot
    จะเขียนอะไรลงไป ก็เปิดให้เพื่อนมา Download หรือเข้าถึงได้
    แต่ Winddows 8 อาจกำหนด Permission  ว่า User ห้ามเขียน
    แล้วเราก็เป็น User หนึ่ง (บางกรณีเราก็เป็นเพียง User ของเครื่อง)
    ต้องเข้าไปแก้ Security ให้ User เป็นแบบ Full Control

    16_folder_permission.png
  20. เปิดโปรแกรม Notepad แล้วพิมพ์ hello world
    เพราะคิดจะทำให้ใคร ๆ เข้าเครื่องของเรา และเห็นข้อมูลที่เราสร้างไว้

    17_notepad.png
  21. สร้างแฟ้มชื่อ helloworld.php
    แล้วทดสอบเปิดด้วย Web Browser ในเครื่องของเรา
    ยังไม่ต้องไปลองที่ไหนไกลนัก

    18_local_hello.png
  22. ลองเรียกใช้ function phpinfo() เพื่อแสดงข้อมูลของเครื่อง
    ที่ฟังก์ชันนี้พอจะแสดงออกมาได้ ก็เยอะครับ
    แล้ว save as เป็น “phpinfo.php”

    19_notepad_phpinfo_helloworld.png
  23. หากเรียบร้อยแล้ว ผมอยากมี Database ไว้ใช้
    ก็เข้า Microsoft Web Platform Installer ผ่าน Metro UI
    ด้วยการคลิ๊กที่ปุ่ม Windows แล้วมองหาโปรแกรมนี้

    20_metro_screen.png
  24. พบ MySQL Windows 5.1 ผมก็เลือก Add และ Install
    โปรแกรมจะถามให้เราใส่รหัสผ่านของ root
    ก็พิมพ์เข้าไปครับ เช่น “Song:letitbe” หรือ อะไรที่ชอบ

    21_mysql_51.png
  25. หลังติดตั้งเสร็จก็จะรายงานว่า were successfully installed
    MySQL จะไม่ถูกติดตั้งลอย ๆ แต่เชื่อมกับ IIS และ PHP เรียกใช้กันได้เลย
    เพราะเป็นหน้าที่ของ Installer ที่ทำหน้าที่ config ให้อัตโนมัติ

    22_mysql_finish.png
  26. MySQL จะเปิดบริการผ่าน port 3306
    ลองใช้ DOS ตรวจการเปิด port ด้วย
    DOS>netstat -na | find “:3306”

    23_netstat_3306.png
  27. การบริหาร MySQL ผมมักใช้ phpmyadmin
    ใน xampp หรือ appserv เค้าก็ลงมาให้เลย แต่มองหาใน installer ไม่พบ
    จึงต้องหาดาวน์โหลดมาลงเองผ่านเว็บไซต์ของ phpmyadmin.net
    ได้ phpmyadmin รุ่น 4.7.3 ไม่ได้อ่านรายละเอียด
    เห็นเป็นรุ่นใหม่ ผมก็ Download มาเลย

    24_download_phpmyadmin.png
  28. ทำการ unzip ลองห้อง c:\inetpub\wwwroot
    แล้วคาดว่าจะเรียกใช้งานผ่าน Web Server ได้ทันที

    25_phpmyadmin_unzip.png
  29. ลองเปิดจากในเครื่อง มีหน้าจอเปิดรอรับ User และ Password
    ตามที่เคยตั้งว่า User = root Password = Song:letitbe หรือะไรที่ชอบ
    เปิดในเครื่องตนเอง เปิดจากเครื่องอื่นเรียก http://localhost ไม่ได้นะ

    26_phpmyadmin_login.png
  30. ชมพูเต็มจอเลย เข้า google ใช้เลข 574 ไปช่วยหาสาเหตุ ก็ไม่พบ
    มีความเป็นไปได้หลายเรื่องที่เกิดปัญหา
    สิ่งที่ฉุกขึ้นมาในความคิดคือ รุ่นของ phpmyadmin ไม่ลงรอยกับที่อยู่ในเครื่อง
    ไปอ่านเงื่อนไขก็จริงครับ phpmyadmin 4.7.3 ต้องใช้กับ mysql 5.5
    แต่ของผมใช้รุ่น MySQL 5.1 เอง

    27_phpmyadmin_473_error.png
  31. ไปสำหรวจในห้อง phpmyadmin พบแฟ้มเพียบเลย
    ในอดีตต้องมาแก้ไข config เดี๋ยวนี้ไม่ต้องล่ะครับ
    การแก้ไขก็ไม่ยากเลย ไปหา phpmyadmin รุ่นเก่า แล้วลบห้องนี้ทิ้ง

    28_phpmyadmin_folder.png
  32. หลังติดตั้ง phpmyadmin 4.0.10.20 แล้ว
    ผมเรียกจากเครื่องที่บ้านผ่าน IP Address เพราะเครื่องที่ลงโปรแกรมอยู่ที่ทำงาน
    ก็ใช้งานได้ปกติ ไม่ใช่เรียกผ่าน localhost หรือ 127.0.0.1 นะครับ

    29_phpmyadmin_40.png
  33. เริ่มงานจากการสร้างตาราง (Table) ในฐานข้อมูล Test
    มี 1 Field ชื่อว่า Test เป็นแบบ Integer

    30_phpmyadmin_create_table.png
  34. ใส่ข้อมูลที่เป็นตัวเลขเข้าไป 1 ระเบียน
    มีค่าเท่ากับ 5

    31_phpmyadmin_insert_5.png
  35. หากจะให้สมบูรณ์ต้องมีอย่างน้อย 2 Fields
    ตัวอย่างนี้สร้าง ID เป็น Auto_Increment และ Test เป็น Varchar ขนาด 50 ตัวอักษร

    32_phpmyadmin_varcha_2_fields.png
  36. เขียนโปรแกรมด้วยภาษา PHP เพื่อเรียกข้อมูลจากตาราง Test มาแสดง
    โปรแกรมนี้เขียนแบบง่าย ๆ ไม่ซับซ้อน
    ผมแชร์เป็น ต.ย.23 ใน http://www.thaiall.com/php

    33_select_in_wwwroot.png
  37. ผลลัพธ์กรณีเรียกข้อมูลที่มี 1 Field แต่มี 2 Records
    ผ่าน IP Address จริงจากที่บ้าน เข้าที่ทำงาน

    34_select_in_browser.png
  38. ทำการ Insert ข้อมูลเข้าตารางที่มี 2 ระเบียน
    เป็นคำว่า สวัสดีชาวโลก กับ Hello world!

    35_phpmyadmin_insert.png
  39. ข้อมูลเก็บแบบ UTF-8 สามารถอ่านได้ปกติ
    จากใน phpmyadmin ไม่พบปัญหาภาษาไทย
    เดี๋ยวนี้ใคร ๆ ก็ใช้ UTF-8

    36_phpmyadmin_browse.png
  40. เขียนโปรแกรม และเตรียม code ให้รับกับ UTF-8
    ทั้ง charset หรือ set names หรือ encoding ของ source code

    37_select_with_utf8.png
  41. ผลลัพธ์ก็ได้เห็นคำว่า สวัสดีชาวโลก สมดังมุ่งหมาย
    นี่ก็เป็นทั้งหมดที่อยากเล่าให้ฟังครับ .. ชาวโลก

    38_helloworld_in_browser.png

</process>

การ rename database ใน mysql

rename mysql database
rename mysql database

มีเพื่อนถามถึงการ rename database ใน mysql
ลองเข้าไปดูพบว่ามีคำสั่ง rename database อยู่จริง
พบว่าถูกเพิ่มเข้าไปในรุ่น 5.1.7 แต่ถูกลบออกในรุ่น 5.1.23
หากเรียกใช้ไม่ได้ ก็แสดงว่าคำสั่งใช้ไม่ได้ในรุ่นที่ท่านใช้อยู่
ถ้าต้องการ rename database มีคำแนะนำ 2 วิธี
1. ใช้ phpmyadmin คลิ๊กที่ database นั้น แล้วเลือก operations
มองหา Rename database to: แล้วกรอกชื่อใหม่ แล้วกดปุ่ม Go
2. ใช้ mysql command line
หากมี database ชื่อ test1 และต้องการเปลี่ยนเป็น test2
สามารถทำได้ดังนี้

>show databases;
>create database test2;
>use test1;
>show tables;
>rename table test1.a to test2.a;
>drop database test1;

ก็เป็นอันเรียบร้อย
https://dev.mysql.com/doc/refman/5.1/en/rename-database.html

mysqlworking สำหรับทดสอบการยิงระเบียนจำนวนมาก

mysql working
mysql working

ปรับ php script ชื่อ mysqlworking.php
สำหรับบริหารจัดการ table ใน database บน mysql
ให้ยิงระเบียนได้เท่าจำนวนที่ต้องการ ตั้งไว้ 1000 ระเบียน
ทีแรกจะยิ่งเข้าไปสัก 1 ล้านนึง
แต่จากการทดสอบ ในเครื่อง Desktop ใช้ Win8 ที่ติดตั้ง xampp + deepfreeze
พบว่าแค่ 600 ระเบียนก็เกิน 30 วินาทีแล้ว
ต้องแก้ max_execution_time ผ่าน ini_set() ถึงจะไม่มี error message
แต่ถ้ายิงไปเป็นล้าน คงรอกันข้ามคืนข้ามวัน
ก็มีความเป็นไปได้หลายอย่างที่ทำให้ response จาก mysql ช้าขนาดนี้
แต่ยังไม่ได้ตรวจสอบ
ถ้าทดสอบกับ http://thaiabc.ueuo.com/
พบว่า response ดีมาก ๆ ยิงเข้าไป 1 พันระเบียนใช้เวลาไม่ถึง 1 วินาที
แก้ไขเพิ่มเติม
พอดึกมาหน่อย เข้าไปปรับ code หลายจุด
โดยเฉพาะอาการช้าเกินเหตุ เมื่อ insert ข้อมูลเพียง 1000 ระเบียน
ก็พบว่าการ create database บน xampp
กำหนด default ของ engine เป็น innodb
เมื่อเปลี่ยนเป็น myisam พบว่าวิ่งฉลุยเร็วเหมือนไม่ได้คิดอะไร
insert เข้าไปเป็นล้าน ยังรอไม่นานเลย
จึงปรับ code ให้สามารถสร้างทั้งแบบ innodb และ myisam
จะได้เปรียบเทียบกันได้

โปรแกรมทดสอบการจัดการข้อมูลใน MySQL บน Smartphone [3]

script to manage mysql
script to manage mysql

ได้สมาร์ทโฟน Android ราคา 2900 บาทมาเครื่องหนึ่ง
ติดตั้ง App: Palapa Web Server
ที่ให้บริการ Web Server, PHP และ MySQL ซึ่งซอฟท์แวร์นี้ใช้งานได้ฟรีไม่จำกัด
พบว่าเปิดบริการ Web server ได้ตามปกติ
แล้วติดตั้ง FTP server
กำหนดห้องเป็น /sdcard/pws/www/ ทำให้สามารถเขียนโปรแกรมบน PC
แล้วส่งไปประมวลผลที่ Smart Phone ในฐานะ Web Server
มีประเด็นเล่าสู่กันฟังดังนี้
1. Smart Phone จะมี IP ในวง Wifi เช่น 192.168.2.2 ดังนั้นจะใช้ 3G ไม่ได้
เพราะถ้าใช้ 3G เครื่องในวง Wifi ก็จะไม่รู้จัก SmartPhone ในฐานะ Web Server
2. ทดสอบเปิดดูว่าติดต่อได้หรือไม่โดยใช้ Browser ไปที่ http://127.0.0.1:8080
3. สามารถใช้ระบบบริหารจาก http://127.0.0.1:9999
4. ถ้า install Phpmyadmin จาก Smartphone
แล้วก็จะเปิด http://127.0.0.1:9999/phpmyadmin
5. download mysqlworking.php จาก
http://www.thaiall.com/perlphpasp/source.pl?key=9116
แล้วกำหนด user & password เป็น root กับ adminadmin
แล้ว save as กำหนด type เป็น UTF8 ด้วย Editplus3
6. ส่ง mysqlworking.php เข้าห้อง /sdcard/pws/www/
แล้วเปิด http://127.0.0.1:8080/mysqlworking.php

phpmyadmin บน Palapa
phpmyadmin บน Palapa

สำหรับบทเรียนเรื่อง FTP Server บน Smart Phone
อยู่ที่ http://www.thaiall.com/learn/useftp.htm

web admin on palapa
web admin on palapa

Palapa Web Server
http://alfanla.com/palapa-web-server/
แพคเกจประกอบด้วย
1. Lighttpd 1.4.35
2. PHP 5.5.15
3. MySQL 5.1.69
4. MSMTP 1.4.32
5. Web Admin 2.1.0

ข้อมูลอื่น ๆ ที่จำเป็นต้องทราบ
Default Document Root (htdocs) คือ Path : /sdcard/pws/www/
Default URL คือ Address : http://127.0.0.1:8080
Web Admin Informations
Address : http://127.0.0.1:9999
Username : admin
Password : admin
MySQL Informations
Host : localhost (127.0.0.1)
Port : 3306
Username : root
Password : adminadmin
phpMyAdmin (ถ้าใช้ก็ต้องกดปุ่มติดตั้งเพิ่มเติม)
Address : http://127.0.0.1:9999/phpmyadmin
Username : root
Password : adminadmin

ทีแรกคิดว่าจะเรียบเรียงเรื่อง LAMP ไว้ที่เว็บไซต์เกี่ยวกับการพัฒนา Android APP
แต่ดูแล้ว น่าจะมีอะไรอีกมากในการใช้งาน Smart Phone จึงฝากไว้กับ Blog ก่อน
http://www.thaiall.com/android/

ใช้ xampp เป็น server แต่ลืมติดตั้ง service

xampp console
xampp console

มีเพื่อนเล่าว่า เครื่องบริการเว็บล้มบ่อยมาก แทบทุกสัปดาห์
โดยโปรแกรมที่ใช้เปิดบริการ คือ xampp
เพราะมี console application ที่ใช้สั่งงานได้ง่าย
มีอยู่วันหนึ่งล้มอีก ผมลองเข้าไปดู เมื่อ login เข้าระบบ
ก็พบ application ค่อย ๆ ตื่น และปิด service ทีละตัว
จึงรู้ว่า xampp ไม่ได้เปิด service ทิ้งไว้
ในแบบที่ server ทั่วไปทำกัน

Download โปรแกรมได้ที่ http://www.apachefriends.org/index.html

ผลการตรจสอบพบประเด็น ดังนี้
1. แก้ไขโดยเปิด service ของ apache กับ mysql
ก็คาดว่าครั้งต่อไป server ตัวนี้คงไม่ล้มเพราะเรื่อง service อีก
2. จะเปิด service พบว่า batch file สำหรับเปิดบริการหายไป
จึงไปหาจากเครื่องอื่นมาวางไว้
3. โดยคำสั่งพื้นฐานที่อยู่ใน batch file ที่ใช้เปิด service มีดังนี้
DOS> bin\httpd -k install
DOS> net start Apache2.4
DOS> bin\mysqld
–install mysql
–defaults-file=”%cd%\bin\my.ini”
DOS> net start MySQL

4. อันที่จริงมีรายละเอียดเกี่ยวกับการติดตั้ง service
ของ mysql ที่ต้อง set my.ini ให้เรียบร้อย
แนะนำว่าไปหา copy หรือ reinstall xampp ใหม่ดีกว่า
หากว่า .bat ทั้งหลายหายไป

ถึงเวลาย้ายจาก Mysql ไป MariaDB

mariadb and mysql
mariadb and mysql

MariaDB กำลังจะมาแทน MySQL

mysql was replaced with mariadb
mysql was replaced with mariadb

http://www.unixmen.com/10-easy-steps-to-upgrade-from-mysql-to-mariadb-on-centos-6-4/

หลัง Oracle ซื้อ MySQL การพัฒนาที่เคยเป็นไปอย่างต่อเนื่องในฐานะ Open Source ก็เปลี่ยนไป ด้วยท่าทีของการเป็นผู้ทำธุรกิจซอฟท์แวร์ ฝั่งนักพัฒนาทั่วโลกเห็นท่าไม่ค่อยดีก็เริ่มทะยอยย้ายฐานไป MariaDB เพราะเรื่องนี้ผู้พัฒนาเลือกได้ และมีเวลาเลือกซะด้วย

transaction per second
transaction per second

+ http://slashdot.org/topic/bi/mariadb-vs-mysql-a-comparison/
+ http://blog.mariadb.org/mysql-man-pages-silently-relicensed-away-from-gpl/
+ http://fedoraproject.org/wiki/Features/ReplaceMySQLwithMariaDB
+ http://www.admin-magazine.com/Articles/MariaDB-vs.-MySQL
+ https://mariadb.org/
+ http://dev.mysql.com/

Oracle is killing MySQL
by Nick Farrell

The founder of MySQL Michael Widenius “Monty” claims that Oracle is killing off his MySQL database and he is recommending that people move to his new project MariaDB. In an interview with Muktware Widenius said his MariaDB, which is also open source, its on track to replacing MySQL at WikiMedia and other major organizations and companies.

He said MySQL was widely popular long before MySQL was bought by Sun because it was free and had good support. There was a rule that anyone should get MySQL up and running in 15 minutes. Widenius was concerned about MySQL’s sale to Oracle and has been watching as the popularity of MySQL has been declining. He said that Oracle was making a number of mistakes. Firstly new ‘enterprise’ extensions in MySQL were closed source, the bugs database is not public, and the MySQL public repositories are not anymore actively updated.

Widenius said that security problems were not communicated nor addressed quickly and instead of fixing bugs, Oracle is removing features. It is not all bad. Some of the new code is surprisingly good by Oracle, but unfortunately the quality varies and a notable part needs to be rewritten before we can include it in things like MariaDB. Widenius said that it’s impossible for the community to work with the MySQL developers at Oracle as it doesn’t accept patches, does not have a public roadmap and there was no way to discuss with MySQL developers how to implement things or how the current code works.

Basically Oracle has made the project less open and the beast has tanked, while at the same time more open versions of the code, such as MariaDB are rising in popularity.

Oracle Makes More Moves To Kill Open Source MySQL
by Alex Williams

18 ส.ค.55 Oracle is holding back test cases in the latest release of MySQL. It’s a move that has all the markings of the company’s continued efforts to further close up the open source software and alienate the MySQL developer community.

The issue stems back to a recent discovery that the latest MySQL release has bug fixes but without a single one having any test cases associated with it.  That creates all sorts of problems for developers who have no assurance that the problem is actually fixed.

It’s pretty clear that Oracle is trying to make it as difficult as possible to use MySQL. The result is a wave of unsettlement in the developer community about what Oracle considers open and what it sees as closed. The move is causing problems for developers in all manner of ways as expressed here and here.

MySQL is the popular database used by developers throughout the world.  Oracle gained control of the software distribution when it acquired Sun Microsystems in 2010.

According to a post on MariaDB, MySQL has used a testing framework called mysql-test since 1999. Over the years tests have been built for new features and regression tests that guarantee that a bug fix is permanent. Developers such as those from Facebook and Twitter rely on the testing framework. At Twitter, MySQL serves as the “persistent storage technology behind most Twitter data: the interest graph, timelines, user data and the Tweets themselves.”

It also appears that Oracle pulled the revision history for MySQL. The revision history groups changes to the millions of lines of source code into what are known as change sets. A change set shows the changes for a particular feature. It shows who made the bug fix, when and why. By removing the revision history, Oracle will keep developers guessing about what is fixed and what is not.

For observers, these moves do not look like simple oversights. More so, it appears that Oracle is making its revision tests and histories closed source. It’s not so surprising knowing Oracle and its history.

But it does raise questions for the open source community about what to do as seen in the comments on Hacker News.

I like what one commenter said about the issue. Forget Oracle. It really is time to move on.

http://techcrunch.com/2012/08/18/oracle-makes-more-moves-to-kill-open-source-mysql/

Why Oracle Won’t Kill MySQL
by Victoria Barret, Forbes Staff

It’s tempting to speculate that Oracle ‘s bid for Sun Microsystems is a convenient way to kill off open-source database wonder, MySQL. But MySQL’s former chief executive, Mårten Mickos, sees things differently. If anything, Oracle badly wanted MySQL.

The reason: Microsoft .

Oracle Chief Larry Ellison Larry Ellison might become a friend of open source, after all, if it helps him get at his long-time enemy, Microsoft. Sun acquired MySQL last year for $1 billion. Oracle was rumored to also be a bidder. How sweet, then to get MySQL a year later in a cheap deal for a slew of other businesses. (Oracle is paying $5.6 billion for Sun excluding its cash and debt piles.)

Mickos talked with Forbes on Monday after the Oracle-Sun deal was announced.

Forbes: What’s your initial reaction to the news that Oracle wants to acquire Sun?

Marten Mickos: It’s amazing, and not entirely surprising. Oracle has the money and is a long-term, strategic player. They went into applications to compete with SAP and have successfully done this. Now they want to out-compete Microsoft.

Microsoft’s database business is the fastest growing. Oracle can use MySQL to achieve a stronger developer community.

But doesn’t that risk cannibalizing Oracle’s database business?

MySQL is growing like crazy. That hasn’t hurt Oracle. MySQL works for Web-based applications. Oracle is for older, legacy applications. Oracle might as well cannibalize themselves, then have someone else do it.

You don’t think they’ll just kill the business? They’ve let Siebel’s online efforts languish and could do the same here.

They can kill the business. But I don’t think they will. Larry Ellison is smart. MySQL was getting around 70,000 downloads a day when I left. It’s an amazing grip on young developers. Having MySQL makes business sense for Oracle.

How will this deal impact MySQL’s community of developers? One might say they’re now working for “the man.”

Any popular open-source project has multiple communities. They don’t care who owns it. They care whether it works. There’s a vocal minority that will say a lot about this. But MySQL has an installed base of 12 million. You and I pay attention to this stuff, but lots of developers probably don’t even know MySQL is owned by Sun.

InnoDB (an open-source technology that Oracle acquired in 2005) is still very popular. It’s run surprisingly autonomously. That’s really the issue. Will Oracle run MySQL separately, or try to merge it with other groups? They could mess it up.

How?

By slipping it into the database division. Then you’ll see turf wars. The power of MySQL is its openness. Oracle is different. They don’t have their bug database public, for example. You risk losing the philosophy of MySQL and its edge in the market.

Or, there’s a risk they give it away as a freebie. One of MySQL’s strengths is that it has a business model.

But my belief is that Oracle’s executives understand this.

So were Larry’s anti-open source rants all bravado?

Yes, of course. I think he loves open source. I am just speculating, but he is an outside-of-the-box thinker. And it will allow him to compete creatively with Microsoft, his favorite enemy.

http://www.forbes.com/2009/04/20/mysql-marten-mickos-technology-enterprise-tech-mysql.html