mysql的學習

來源:互聯網
上載者:User

標籤:使用   amp   lin   pac   測試   方法   串連池   rman   沒有   

1,mysql的安裝:http://jingyan.baidu.com/article/642c9d34aa809a644a46f717.html

     若是重新安裝,則需要將mysql徹底卸載才可以,然後安裝此步驟即可。安裝時,把密碼修改一下,不使用之前的密碼即可安裝成功。

2,URL的連接字串:String url = "jdbc:mysql://localhost:3306/yun?characterEncoding=UTF8"

                 + "&user=root&password=centos"                  + "&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false" ;     其中,yun:自己建立的資料庫             zeroDateTimeBehavior=convertToNull:時間戳記類型處理,https://my.oschina.net/u/2284972/blog/479297             transformedBitIsBoolean=true:解決中文亂碼問題             transformedBitIsBoolean=true:http://www.knowsky.com/1056401.html3,串連資料庫三種方法:    spring jdbc(java資料庫連接),速度慢    spring datasource(DriverManagerDataSource建立串連是只要有串連就建立一個connection,根本沒有串連池的作用),    spring Connection pooling(DruidDataSource資料庫連接池) 速度最快    其中,使用資料庫連接池的,速度最快;直接使用jdbc的是最慢的。要是使用單元測試,jdbc還可以看到紅色還是綠色的條。

mysql的學習

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.