Tag: troubleshooting

แก้ปัญหา VirtualBox เรียกใช้งานอุปกรณ์ USB ไม่ได้บน Ubuntu

ผมเคยเจอปัญหา VirtualBox เรียกใช้งานอุปกรณ์ USB ไม่ได้ตั้งแต่สมัย Version แรกๆ ตอนนั้นเลยไม่ประทับใจมันเท่าไหร่ และไม่คิดจะแก้ปัญหามันด้วย ตอนที่ผมเพิ่งลง Ubuntu 9.10 ใหม่ๆ ก็ลองติดตั้ง Virtualbox แล้วลง Windows XP ปรากฏว่ามันมองเห็น Flash Drive ที่ผมเสียบเข้าไป จนมาวันนี้ผมเพิ่งสังเกตว่ามันใช้งาน USB ไม่ได้อีกแล้ว ก็เลยลองหาคำตอบจากเน็ตก็ได้คำตอบว่าต้องเพิ่มชื่อ User ของเราให้อยู่ Group เดียวกับ vboxusers โดยสามารถเข้าไปแก้ไขไฟล์ /etc/group ได้โดยตรง

mrgill@mrgill-laptop:~$ sudo nano /etc/group

เพิ่มชื่อ user ของคุณหลัง group vboxusers

vboxusers:x:123:mrgill

หรือจะใช้คำสั่งด้านล้างก็ได้

mrgill@mrgill-laptop:~$ sudo usermod -G vboxusers -a `whoami`

ตัวอย่างผมใส่ `whoami` แทน User mrgill แต่ถ้าใครจะใส่ชื่อ user ไปตรงๆ ก็ได้ครับ

จากนั้น Logout แล้ว Login ใหม่ อุปกรณ์ USB ก็จะพร้อมให้งานแล้วครับ (more…)

1 Comment November 11, 2009

จะเอา /var/lib/mysql บน Ubuntu ไปไว้ที่อื่นทำอย่างไร

ต้องการเอา /var/lib/mysql ไปไว้ที่อื่นครับเพราะกลัวเวลาเครื่องมีปัญหาอาจทำให้ข้อมูลหายได้เพราะ /var/lib/mysql อยู่ใน / เลย(ไม่ได้แบ่ง partition แยกออกมา) วิธีแรกที่ผมทำเลยคือ

root@ubuntu:~# mv /var/lib/mysql /data/mysql root@ubuntu:~# ln -s /data/mysql /var/lib/mysql

ก็คือ move จาก /var/lib/mysql ไปไว้ที่ /data/mysql ผลคือตอน restart mysql มันจะฟ้องว่า

root@ubuntu:~# /etc/init.d/mysql restart * Stopping MySQL database server mysqld [ OK ] * Starting MySQL database server mysqld [fail]

ไปใน /var/log/syslog ก็เจอ error ประมาณนี้ แล้วจะทำไงดี

root@ubuntu:~# tail -f /var/log/syslog Nov 9 02:36:29 ubuntu kernel: [ 2394.732730] type=1503 audit(1257752189.048:131): operation="open" pid=5484 parent=5483 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/" Nov 9 02:36:30 ubuntu kernel: [ 2395.745479] type=1503 audit(1257752190.061:132): operation="open" pid=5494 parent=5493 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/" Nov 9 02:36:31 ubuntu kernel: [ 2396.761345] type=1503 audit(1257752191.080:133): operation="open" pid=5504 parent=5503 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/" Nov 9 02:36:31 ubuntu kernel: [ 2396.774493] type=1503 audit(1257752191.092:134): operation="open" pid=5513 parent=5512 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/" Nov 9 02:36:31 ubuntu /etc/init.d/mysql[5520]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Nov 9 02:36:31 ubuntu /etc/init.d/mysql[5520]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed Nov 9 02:36:31 ubuntu /etc/init.d/mysql[5520]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Nov 9 02:36:31 ubuntu /etc/init.d/mysql[5520]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

(more…)

3 Comments November 9, 2009


Recent Entries

Random Posts

Social Network

Tag Cloud

Calendar

March 2010
S M T W T F S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  

RSSTwitter: imrgill

RSS LinuxDotSothorn

RSS UbuntuClub

RSS Blognone

Tag

ภาษาไทย 2009 adobe amsn antivirus apt-get bash chat clip dns entertainment Facebook firefox Forward mail free google graphic grave accent How to howto im install Internet karmic keyboard Linux logout monitoring operating system os Programming recovery script Server shell script sms Social network Software themes troubleshooting twitter Ubuntu utility virtualization Windows

Categories

Archives

Blogroll

Meta

 

You need to log in to vote

The blog owner requires users to be logged in to be able to vote for this post.

Alternatively, if you do not have an account yet you can create one here.

Powered by Vote It Up

Get Adobe Flash playerPlugin by wpburn.com wordpress themes