phpmyadmin 出現"Connection for controluser as defined in your configuration failed."
解決辦法:
1. Type nano /etc/phpmyadmin/config.inc.php in the Linux terminal. You can substitute nano for vi or your favorite text editor.
2. Find the two blocks of text that read:
$cfg['Servers'][$i]['controluser'] = $dbuser;
$cfg['Servers'][$i]['controlpass'] = $dbpass;
one is near the top embedded in an if statement, and the other is towards the bottom. The text is not exactly the same for each block, but $cfg['Servers'][$i]['controluser'] is what matters. The block that is actually used by phpMyAdmin depends on your setup, but just for simplicity we will apply the change to both.
3. Just comment out those four lines by adding a // in front of each one.
4. Save, and the error should disappear next time you access phpMyAdmin. If you are still having trouble, feel free to post a comment.
參考資料:
Connection for controluser as defined in your configuration failed.
Allen's ubuntu 與 joomla 學習日誌
2010年7月22日星期四
mysql備份回存(資料目錄備份)
MySQL 預設的儲存目錄在 /var/lib/mysql 內容,底下會有以資料庫名稱的目錄,例如 mydb 目錄便應該是 mydb 資料庫的資料。
如果 MySQL 正在運行,請先停止 MySQL,原因是可能會有資料未完全寫入,而 MySQL 會 lock 在使用中的 DB 檔案。
/etc/init.d/mysql stop
備份/var/lib/mysql 資料夾,回復時直接將備份檔回存即可。
參考資料:
[MySQL]mysql備份與還原
MySQL 的備份及復原
如果 MySQL 正在運行,請先停止 MySQL,原因是可能會有資料未完全寫入,而 MySQL 會 lock 在使用中的 DB 檔案。
/etc/init.d/mysql stop
備份/var/lib/mysql 資料夾,回復時直接將備份檔回存即可。
參考資料:
[MySQL]mysql備份與還原
MySQL 的備份及復原
安裝lazyscript
動手安裝:
1. 首先先開啟終端機畫面
2. 在終端機上輸入並執行
sudo add-apt-repository ppa:ossug-hychen/lazyscripts
3. 在終端機下執行
sudo apt-get update && sudo apt-get install lazyscripts
4. 完成
5.開始使用,請點擊 " 應用程式==>系統工具==>Lazyscripts "
參考資料:
Lazyscripts Project
1. 首先先開啟終端機畫面
2. 在終端機上輸入並執行
sudo add-apt-repository ppa:ossug-hychen/lazyscripts
3. 在終端機下執行
sudo apt-get update && sudo apt-get install lazyscripts
4. 完成
5.開始使用,請點擊 " 應用程式==>系統工具==>Lazyscripts "
參考資料:
Lazyscripts Project
2010年7月21日星期三
joomla 無法連結到mysql 問題解法
當joomla 網頁畫面出現以下訊息
代表使用者修改了mysql 資料庫用戶名稱密碼(phpMyAdmin登入介面)以至於joomla無法進入mysqly 資料庫
解決辦法:
到/var/www/Lab 中找到 configuration.php
用gedit開啟編輯內容,找到以下兩行
將名稱密碼修改成正在使用的名城密碼即可。
重新啟動apache
參考資料
修改mysql密碼後,joomla無法連結資料庫
Database Error: Unable to connect to the database: Could not connect to MySQL
Database Error: Unable to connect to the database:Could not connect to MySQL
代表使用者修改了mysql 資料庫用戶名稱密碼(phpMyAdmin登入介面)以至於joomla無法進入mysqly 資料庫
解決辦法:
到/var/www/Lab 中找到 configuration.php
用gedit開啟編輯內容,找到以下兩行
var $user = 'root';var $password = 'xxx';
將名稱密碼修改成正在使用的名城密碼即可。
重新啟動apache
/etc/init.d/apache2 restart
參考資料
修改mysql密碼後,joomla無法連結資料庫
Database Error: Unable to connect to the database: Could not connect to MySQL
2010年7月20日星期二
mount 與 umount 指令
mount
單純的輸入 mount 會顯示目前掛載的資訊(包含掛載選項option)
mount -a
依照設定檔 /etc/fstab 的資料將所有未掛載的磁碟都掛載上來
mount -l
加上 -l 可增列 Label 名稱!
mount -o
後面可以接一些掛載時額外加上的參數!比方說帳號、密碼、讀寫權限等:
單純的輸入 mount 會顯示目前掛載的資訊(包含掛載選項option)
mount -a
依照設定檔 /etc/fstab 的資料將所有未掛載的磁碟都掛載上來
mount -l
加上 -l 可增列 Label 名稱!
mount -o
後面可以接一些掛載時額外加上的參數!比方說帳號、密碼、讀寫權限等:
ro, rw: 掛載檔案系統成為唯讀(ro) 或可讀寫(rw)
async, sync: 此檔案系統是否使用同步寫入 (sync) 或非同步 (async) 的
記憶體機制,請參考檔案系統運作方式。預設為 async。
auto, noauto: 允許此 partition 被以 mount -a 自動掛載(auto)
dev, nodev: 是否允許此 partition 上,可建立裝置檔案? dev 為可允許
suid, nosuid: 是否允許此 partition 含有 suid/sgid 的檔案格式?
exec, noexec: 是否允許此 partition 上擁有可執行 binary 檔案?
user, nouser: 是否允許此 partition 讓任何使用者執行 mount ?一般來說,
mount 僅有 root 可以進行,但下達 user 參數,則可讓
一般 user 也能夠對此 partition 進行 mount 。
defaults: 預設值為:rw, suid, dev, exec, auto, nouser, and async
remount: 重新掛載,這在系統出錯,或重新更新參數時,很有用!umount -a
將所有掛載的裝置卸載
2010年4月11日星期日
ubuntu vsftp 新增使用者上傳
安裝vsftp
接下來,就可以使用FTP軟體來做連線的動作。
編輯/etc/vsftpd.conf
新增使用者帳號,在終端機輸入
改變使用者家目錄,編輯 /etc/passwd
注意:新的家目錄權限必須設定給此使用者(在此為test 權限700)
參考資料:
ubuntu FTP SERVER 安裝設置( vsftp 版本 )
新增與移除使用者: useradd, 相關設定檔, passwd, usermod, userdel
檔案預設權限:umask
sudo apt-get install vsftpd檢查運作狀況
netstat -tul|grep ftp列會顯示一行訊息,最後會有一個LISTEN,表示已運行待命中。
接下來,就可以使用FTP軟體來做連線的動作。
編輯/etc/vsftpd.conf
#接受本地用戶
local_enable=YES
#可以上傳(全局控制)
write_enable=YES
#本地用戶上傳文件的 umask (rwx:421),這裡拿掉group及others的寫入權限
local_umask=022
#設定chroot_list_file 的位置(若無檔案請自行新增)
chroot_list_file=/etc/vsftpd.chroot_list
#啟動chroot_list
chroot_list_enable=YES
#若為NO,則記錄在chroot_list_file中的用戶將被登入在家目錄無法離開(黑名單);若為YES,則所記錄的用戶將可離開家目錄(白名單)。這裡選擇YES,新增用戶預設無法離開家目錄,如有需要開放再加入名單,安全性較高。
chroot_local_user=YES
新增使用者帳號,在終端機輸入
sudo useradd test #新增使用者test預設家目錄為/home/test 權限700
sudo passwd test #設定使用者test之密碼
改變使用者家目錄,編輯 /etc/passwd
直接修改家目錄位置即可(其他參數請勿修改)test : x : 1001 : 1001 : test : /home/test : /bin/bash^^^ ^^^ ^^^ ^^ ^^^^^^^帳號 帳號id 群組id 群組名 家目錄位置
注意:新的家目錄權限必須設定給此使用者(在此為test 權限700)
參考資料:
ubuntu FTP SERVER 安裝設置( vsftp 版本 )
新增與移除使用者: useradd, 相關設定檔, passwd, usermod, userdel
檔案預設權限:umask
2010年3月18日星期四
2010年3月5日星期五
用root權限開啟檔案總管
1. 在桌面上點擊滑鼠右鍵,並選擇「新增啟動圖示」
2. 在類型的下拉式選單,點一下
3. 並選擇「終端機中的程式」
4. 並在名稱欄位輸入「用root權限開啟檔案總管」(可以自己取喜歡的名稱)
5. 然後在指令欄位輸入「sudo nautilus」
6. 最後按下「確定」
桌面上就多了一個「使用root權限開啟檔案總管」的捷徑。
請左鍵點兩下啟動他。
參考:
在ubuntu下使用 root 權限開啟檔案總管(超詳細教學)
2. 在類型的下拉式選單,點一下
3. 並選擇「終端機中的程式」
4. 並在名稱欄位輸入「用root權限開啟檔案總管」(可以自己取喜歡的名稱)
5. 然後在指令欄位輸入「sudo nautilus」
6. 最後按下「確定」
桌面上就多了一個「使用root權限開啟檔案總管」的捷徑。
請左鍵點兩下啟動他。
參考:
在ubuntu下使用 root 權限開啟檔案總管(超詳細教學)
ubuntu 使用root 登入桌面
To access a root shell, type in a terminal:
參考:
[Myth] There is no root account under Ubuntu
sudo -iTo run a command as root, type:
sudo commandTo start a graphical application as root, type :
gksudo application
參考:
[Myth] There is no root account under Ubuntu
2010年3月4日星期四
從從firefox 直接訂閱到google reader
如果要直接訂閱到Google Reader 可以在Firefox的網址列中輸入 about:config 在籂選器裡輸入
參考:
從Firefox 訂閱到 Google Reader
browser.contentHandlers.types會看到有一堆 types.0、types.1、types.2、types.3的名稱,這時找到內含值是Google Reader的那一行,如果是types.1就改types.1.uri 內含值的字串,把
http://fusion.google.com/add?feedurl=%s改為
http://www.google.com/reader/view/feed/%s
參考:
從Firefox 訂閱到 Google Reader
訂閱:
文章 (Atom)