Bloodshed 的 Dev-C++ 已經很久沒有維護了,最近上課的時候也一直遇到許多問題。
幸運的是,發現在 SourceForge 上面還有人在維護 Dev-C++!
Dev-C++ 的後續版本 continued »
Dev-C++ 的後續版本
Published on 2012/04/22
MySQL Create User & Grant Privilege
Published on 2012/03/27
新增管理帳號的SQL指令:
create user 'myadmin'@'localhost' identified by 'My@dm1n';
grant all privileges on *.* to 'myadmin'@'localhost';
建立學生帳號 student1
student1 這個學生帳號登入後 只能使用 student1 這個資料庫,指令為:
create database student1;
create user 'student1'@'localhost' identified by 'student1';
grant all privileges on student1.* to 'student1'@'localhost';
如果不想給學生刪掉自己的資料庫的權限,可以改成
grant SELECT,INSERT,UPDATE,DELETE,CREATE,DROP on student1.* to 'student1'@'localhost';
如果要更改使用者的密碼:
use mysql;
update user set password=PASSWORD('MyP@s$w0rd') where user='root';
FLUSH PRIVILEGES
一篇很棒的參考文章:
MySQL中文參考手冊-權限
常用數學符號
Published on 2012/03/24
Wikipedia 上的常用數學符號表
http://en.wikipedia.org/wiki/List_of_mathematical_symbols
Linux 列出套件內容
Published on 2012/03/02
想要知道某一個套件內究竟包含哪些檔案,特別是想要知道這些檔案究竟安裝到哪裡去了。
在 Debian 架構中,列出某一套件的內容:
$ apt-file list packagename
前提是要安裝 apt-file
# apt-get install apt-file
然後更新資訊庫
# apt-file update
Linux 列出套件內容 continued »
ScientificLinux GDM 自動登入
Published on 2012/02/08
OS: Scientific Linux 6.2
欲達成像 Ubuntu 開機就讓使用者自動登入的功能,編輯 /etc/gdm/custom.conf
在[daemon]段內加入
[deamon]
AutomaticLoginEnable=True
AutomaticLogin=使用者帳號
openSUSE 11.4 升級到 12.1
Published on 2011/12/23
利用 zypper 將 openSUSE 11.4 升級到 12.1 版的方式如下:
openSUSE 11.4 升級到 12.1 continued »
Moodle Upgrade
Published on 2011/12/13
After upgrade Moodle from version 2.1.2 to 2.2 an alert suddenly show up as "Database tables are using MyISAM database engine, it is recommended to use ACID compliant engine with full transaction support such as InnoDB." Moodle Upgrade continued »
Dovecot Bug
Published on 2011/12/12
Scientific Linux 更新版本至 6.1 之後,新增的帳號突然無法收信,/var/log/maillog 顯示
-------------
pop3-login: Login: user=
dovecot: pop3(roman): Error: user roman: Initialization failed: mail_location not set and autodetection failed: Mail storage autodetection failed with home=/home/roman
dovecot: pop3(roman): Error: Invalid user settings. Refer to server log for more information.
--------------
發現在 https://bugzilla.redhat.com/show_bug.cgi?id=689085 紀錄了這一項錯誤
Dovecot Bug continued »
Scientific Linux 6.1 Network Install
Published on 2011/11/04
今天在一台老PC上安裝 Scientific Linux 6.1,因為老PC沒有DVD,只有CDROM,所以到
http://ftp1.scientificlinux.org/linux/scientific/6.1/i386/iso/
下載 SL-61-i386-2011-07-27-boot.iso
燒成 CD 之後,開機
Installation Method 選 URL
然後輸入網址:
http://ftp1.scientificlinux.org/linux/scientific/6.1/i386/os/
Windows XP 於開機時清除硬碟內容
Published on 2011/11/03
在網路磁碟環境中,C: 是從網路傳來的虛擬硬碟,電腦主機內原本的硬碟變成 D: 但是從磁碟管理系統看,仍然是第一顆硬碟(disk 0)
學生用久了之後,主機硬碟內殘存了一大堆亂七八糟的檔案,想要在開機的時候把 D: 整個清掉。
解決方案: diskpart 搭配 format
Windows XP 於開機時清除硬碟內容 continued »