In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "what are the methods of DB driver and DB connection string". In daily operation, I believe that many people have doubts about the method of DB driver and DB connection string. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the questions of "what are the methods of DB driver and DB connection string?" Next, please follow the editor to study!
1. MySQL:
(1) JDBC driver jar package: (http://www.mysql.com) mm.mysql-2.0.2-bin.jar
(2) driver class classpath:Driver = org.gjt.mm.mysql.Driver
(3) Database connection URL:
Url = jdbc:mysql://IP (hostName): 3306/DatabaseName.
Url explanation: keyword jdbc mysql
Jdbc means to connect to the database in a way
Mysql means to connect to a mysql database
(2) Oracle:
(1) JDBC driver jar package: (http://www.oracle.com/ip/deploy/database/oracle9i/) classes12.zip
Ojdbc6.jar-the class for JDK 1.6. It contains the JDBC driver class.
Ojdbc5.jar-the class for JDK 1.5. It contains the JDBC driver class.
(2) driver class classpath:Driver = oracle.jdbc.driver.OracleDriver
(3) Database connection URL:
Url = jdbc:oracle:thin:@IP (hostName): 1521:DatabaseName.
Url explanation: keyword jdbc oracle
Jdbc means to connect to the database in a way
Oracle means to connect to an oracle database
Thin indicates the connection mode used (oracle has two connection modes)
3. SQLServer:
(1) driver class classpath:Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
(2) Database connection URL:
Url = jdbc: microsoft:sqlserver://IP (hostName): 1433/DatabaseName.
Url explanation: keyword jdbc microsoft sqlserver
Jdbc means to connect to the database in a way
Microsoft said Microsoft
Sqlserver means to connect to a sqlserver database
4. DB2:
(1) driver class classpath:Driver = com.ibm.db2.jdbc.net.DB2Driver
(2) Database connection URL:
Url = jdbc: db2://IP (hostName): 6789/DatabaseName.
Url explanation: keyword jdbc db2
Jdbc means to connect to the database in a way
Db2 means to connect to a db2 database
At this point, the study of "what are the methods of DB driver and DB connection string" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 210
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.