2012-06-17

windows使用指令來連接及移除網路磁碟機

因為公司安裝的Hyper-V Server僅只有命令列,所以所有動作都必須靠輸入指令來完成(有Linux的fu啊~)

最簡單的,如何連接網路磁碟機哩? 

2012-06-15

Ubuntu Server修改IP

sudo vi /etc/network/interfaces

修改檔案內容:
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx #IP
netmask xxx.xxx.xxx.xxx #子網路遮罩
gateway xxx.xxx.xxx.xxx #Gateway
dns-nameservers 168.95.1.1 168.95.192.1
dns-search do.main

存檔後重新啟動網路:
sudo /etc/init.d/networking restart

2012-06-08

PHP連接MySQL出現Password問題

當PHP連接MySQL如果出現以下訊息:

mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD(‘your_existing_password’). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file

有可能是PHP使用新版連線方式,而MySQL帳號密碼編碼是使用舊版Hash方式,長度只有16(新版是41),導致Hash值不對所以無法登入。