close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_core.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Sep 3, 2010, 12:18:40 PM (15 years ago)
- Author:
-
waue
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v7
|
v8
|
|
| 29 | 29 | * [http://www.mysql.com/products/connector/ mysql 的 jdbc 驅動程式] |
| 30 | 30 | |
| 31 | | = mysql 遠端登入方法 = |
| | 31 | |
| | 32 | 若出現以下錯誤 |
| | 33 | {{{ |
| | 34 | #!text |
| | 35 | Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure |
| | 36 | |
| | 37 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. |
| | 38 | }}} |
| | 39 | |
| | 40 | 代表程式碼連線到 mysql 的設定方法有錯誤,通常是Mysql 只聽 localhost,但你讓他去連 your_ip ,導致出現這樣的訊息,解決方法就是 |
| | 41 | |
| | 42 | A. 連線到 local |
| | 43 | {{{ |
| | 44 | #!text |
| | 45 | DBConfiguration.configureDB(conf, "com.mysql.jdbc.Driver", "jdbc:mysql://localhost/school", "waue", "wauenchc"); |
| | 46 | }}} |
| | 47 | |
| | 48 | B. 讓mysql 可以遠端存取 |
| | 49 | |
| | 50 | = mysql 遠端存取方法 = |
| 32 | 51 | |
| 33 | 52 | 修改 /etc/mysql/my.cnf |