代碼:
ALTER TABLE tbl_name CHANGE [COLUMN] old_col_name column_definition [FIRST|AFTER col_name]
範例:
number1 column:varchar(64) default NULL 在 number2 column 之前,現在要將number1搬到number2之後。
alter table test change column number1 number1 varchar(64) default NULL after number2;
2011年2月7日 星期一
使用 MySQL 時遇到 Can't connect to MySQL server 問題…
如果你的程式使用了太多的 mysqlpp::Connection 物件,會導致你的系統殘存太多的 TCP Connection 在 TIME_WAIT,一旦系統有超過可使用的數量,則會導致無法在建立連線,進而導致 mysqlpp::Connection 無法連線到 mysql 伺服器。
針對此問題,mysql 官方手冊有提到如何對應:
2 Connection to MySQL Server Failing on Windows
When you're running a MySQL server on Windows with many TCP/IP connections to it, and you're experiencing that quite often your clients get a Can't connect to MySQL server error, the reason might be that Windows doesn't allow for enough ephemeral (short-lived) ports to serve those connections. ... 閱讀全文
跟著文章的方式修改 reg 註冊表,重開機後即可增加連線數量。
針對此問題,mysql 官方手冊有提到如何對應:
2 Connection to MySQL Server Failing on Windows
When you're running a MySQL server on Windows with many TCP/IP connections to it, and you're experiencing that quite often your clients get a Can't connect to MySQL server error, the reason might be that Windows doesn't allow for enough ephemeral (short-lived) ports to serve those connections. ... 閱讀全文
跟著文章的方式修改 reg 註冊表,重開機後即可增加連線數量。
訂閱:
意見 (Atom)