Categories
Database Linux Ubuntu การพัฒนาซอฟท์แวร์

reset password MySql

Why are you looking at this wiki page?

Are you looking at this page because you cannot access the mysql server installed on your pc/server when you were trying to see if it works well? Or do you receive error messages like the following? :

ERROR 1045: Access denied for user: 'root@localhost' (Using 
password: NO)

or

ERROR 1045: Access denied for user: 'root@localhost' (Using 
password: YES)

To resolve this problem ,a fast and always working way is the “Password Resetting” .

Categories
Database Linux Ubuntu Web site การพัฒนาซอฟท์แวร์

ลง LAMP Server บน Ubuntu

This tutorial was has been tested on Ubuntu 10.04, 10.10, 11.04, 11.10, 12.04 LTS Precise Pangolin. Also tested in LinuxMint13 and works fine.

Open terminal and Type the command :install it   first  with

sudo apt-get install tasksel

Now to install LAMP, type the taskel command in terminal :

sudo  tasksel

And select LAMP Server:

During the installation  you  will be  asked  to insert the  mysql root  password

Now check if php is working :

$sudo vi /var/www/info.php

and add

<?php
phpinfo();
?>

save and exit

restart apache2 ,

#sudo /etc/init.d/apache2 restart

Now open browser and type :

http://ip/info.php or http://localhost/info.php

Php is installed.

To full manage  your  lamp Server database, install  phpmyadmin

sudo  apt-get  install  phpmyadmin

To login  to phpmyadmin, open browser and type :

http://ip/phpmyadmin   or http://localhost/phpmyadmin

 

– ที่มา http://www.unixmen.com/install-lamp-with-1-command-in-ubuntu-1010-maverick-meerkat/

Categories
Linux Ubuntu เกมส์

ลงเกมส์ 0 A.D. บน Ubuntu

Install from PPA:

sudo add-apt-repository ppa:wfg/0ad
sudo apt-get update
sudo apt-get install 0ad

(If you get errors about unmet dependencies, check that you have the Universe repository enabled in /etc/apt/sources.list.)

Run the game from the command-line as

0ad

or from the application menu item “Games” / “0 A.D.”

Categories
Linux Ubuntu

ลง Netbean บน Ubuntu

ดาวน์โหลด Netbean ที่ http://netbeans.org/

หลังจากนั้น

For Solaris and Linux platforms, the installer file has the .sh extension. For these platforms, you need to make the installer files executable by using the following command: chmod +x <installer-file-name>

จากนั้นก็รันปกติ ไม่ต้องรันบน Terminal

พอติดตั้งเสร็จ เข้าไปที่ directory ที่ลง Netbean ไว้ แล้วเข้าไปที่ bin แล้วรัน netbeans

เป็นอันเสร็จพิธี

Categories
Linux Ubuntu

ลง Java JDK 7 ใน Ubuntu 12.04

This package provides Oracle Java JDK 7 (which includes JRE, the Java browser plugin and JavaFX). However, you can’t only install Oracle JRE – the PPA only provides the full Oracle JDK7 package.

1. To add our PPA and install the latest Oracle Java (JDK) 7 in Ubuntu, use the commands below:

#sudo add-apt-repository ppa:webupd8team/java
#sudo apt-get update && sudo apt-get install oracle-jdk7-installer

2. After the installation you have enable the jdk:

#update-alternatives –display java

3. Check if Ubuntu uses Java JDK 7

#java -version

If all went right the answer should be something like this:
java version “1.7.0_07″
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)

4. Check what compiler is used:

#javac -version

The correct answer should be like this:
javac 1.7.0_07

5. Adding JAVA_HOME to environment
Edit /etc/environment and add JAVA_HOME=/usr/lib/jvm/java-7-oracle to the end of the file.
First open a Terminal (Applications → Accessories → Terminal), then enter:

#sudo gedit /etc/environment

Append to the end of the file:
JAVA_HOME=/usr/lib/jvm/java-7-oracle

6. Removing Oracle JDK 7
If you don’t want to use Oracle Java (JDK) 7 anymore and want to go back to OpenJDK, all you have to do is remove the Oracle JDK7 Installer and the previous Java (OpenJDK, etc.) version will be used:

#sudo apt-get remove oracle-jdk7-installer

Categories
Linux Ubuntu

ลง FilZilla Client บน Ubuntu

sudo apt-get install filezilla

Categories
Linux Ubuntu

ThinkPad Middle Mouse Button Scroll – Ubuntu Linux

This solution applies to Ubuntu LInux Natty Narwhal 11.04, Maverick Meerkat 10.10, and Lucid Lynx 10.04.

Update (Oct. 17, 2010): Thanks to the comments below for an updated solution for Ubuntu Maverick Meerkat 10.10. If you are upgrading from 10.04, insert the following into Terminal:

sudo mv /usr/lib/X11/xorg.conf.d/20-thinkpad.conf /usr/share/X11/xorg.conf.d/20-thinkpad.conf

If this sounds like news to you, then follow the detailed instructions below, except change step one as follows:

Step 1. Create a new file

sudo nano
/usr/share/X11/xorg.conf.d/20-thinkpad.conf

Categories
ฟรีแลนซ์

การคิดค่าทำเว็บ ควรคิดอย่างไรดี?

ที่มา: http://www.imenn.com/2010/10/brainstorming-web-design-estimate/

แม้ว่างานยังล้นมือ เคลียร์ไม่ค่อยทัน แต่พอไปดูเว็บ Web Development Project Estimator แล้วก็ชอบมาก ทวิตไปก็มีเพื่อนๆ มาแนะนำว่า “น่าจะเอามาช่วยกันทำเป็นภาษาไทย ใส่ข้อมูลตามประสบการณ์” ก็เลยคิดว่า ขอแว้บมาจุดประเด็น เผื่อคนทำเว็บคนไหนจะเข้ามาแชร์ไอเดียกันนะครับ

ต้นแบบนั้น ใส่กระบวนการทำเว็บดังนี้

  • Project Brief : การบริฟงาน เริ่มโปรเจ็ค
  • Information Architecture : งานสถาปัตยกรรมด้านสารสนเทศ คร่าวๆ คือการออกแบบโครงสร้างข้อมูล
  • Design Research : การค้นข้อมูล/ตัวอย่างต่างๆ ด้านการออกแบบ
  • Initial Drafts & Sketches : การออกแบบฉบับร่าง
  • Design Revisions : การแก้ไขงาน
  • Final PSD Production : การจบงานดีไซน์ แล้วเก็บงานเป็นไฟล์ Photoshop
  • XHTML/CSS Development : การตัด XHTML และ CSS
  • Server-Side Development : การพัฒนาระบบ / ติดตั้งระบบบน Server
  • Testing & Debugging : การทดสอบและดีบักแก้ไขข้อผิดพลาดต่างๆ
  • Copywriting : งานเขียนเนื้อหา คำบรรยาย และคำโฆษณาต่างๆ
  • Photography : การถ่ายภาพ
  • Photo Art Direction : การกำกับศิลป์ด้านการถ่ายภาพ
  • Client Meetings : การประชุมงานกับลูกค้า
  • Miscellaneous : เบ็ดเตล็ด
Categories
Database

[MySQL] MyISAM กับ InnoDB ต่างกันอย่างไร?

ต่อจากตอนที่แล้ว พอมาใช้ PDO แล้วชีวิตมันก็ดีขึ้นตามลำดับ ที่ควรจะเป็น แต่มาติดปัญหาเรื่อง Transaction นิดหน่อย เนื่องมาจากตารางที่ออกแบบมานั้น (คนอื่นออกแบบมาอีกที) ใช้ engine เป็น MyISAM ซึ่งเท่าที่อ่านมาคือมันไม่รองรับการทำ transaction ผมไม่รู้เสียเวลา่ตั้งนานว่าเขียน Code ผิดตกหล่นตรงไหนนี่ สั่ง rollback ก็แล้ว ข้อมูลก็ยังมาอยู่ดี จนสุดท้ายลองไปดูโครงสร้างของ table โอ้ๆๆ ถึงบางอ้อเลย เลยลองเปลี่ยนมาเป็น InnoDB แล้วทุกอย่างก็เป็นไปอย่างที่คิดไม่มีผิด

ISAM (MyISAM) ซึ่งมีความรวดเร็วในการอ่านและเขียนสูง เนื่องจากมีการจัดเก็บไว้ในรูปแบบของแฟ้มข้อมูล ซึ่งรองรับการอ่านข้อมูลพร้อมๆ กันได้ (เหมาะสำหรับ Web Application) แต่อาจจะมีปัญหาเมื่อใช้งานกับระบบที่ต้องมีการอ่าน/เขียน ข้อมูลในตารางเดียวกัน พร้อมๆ กันที่สำคัญ ฐานข้อมูลประเภท MyISAM จะมีปัญหาเรื่อง Index เสีย และ Data Corrupt บ่อยมาก หากใช้งานใน OS ที่เป็น Windows และมีการ Shutdown อย่างไม่ถูกต้อง ซึ่งทำให้ผู้ดูแลระบบต้องมีการซ่อมแซม (repair table bad_table) ตารางทีมีปัญหาอยู่เรื่อยๆ
InnoDB ข้อดีคือ รองรับการทำ Transaction รองรับการอ่านและเขียน พร้อมๆ กันได้ดีกว่าฐานข้อมูลประเภท MyISAM และยังมีระบบ Auto Data Recovery หากมีการ shutdown โดยไม่เหมาะสม (ไฟดับ)ซึ่งในการใช้งานผู้ใช้สามารถเลือกได้ว่าจะให้ตารางใดเป็นประเภท InnoDB หรือ MyISAM ขึ้นอยู่กับความเหมาะสม (ว่าจะเลือกความเร็ว หรือ ประสิทธิภาพ)

ที่มา: http://www.secondknow.com/2010/467/mysql-myisam-%E0%B8%81%E0%B8%B1%E0%B8%9A-innodb/

Categories
Database

utf8_unicode_ci กับ utf8_general_ci ต่างกันอย่างไร?

utf8_unicode_ci มีการเรียงลำดับที่ดีกว่า

utf8_general_ci จะทำงานได้เร็วกว่า