nhiều người sử dụng yêu cầu bồi thường gấp mười lần tăng trong thực hiện sau khi chuyển đổi các ứng dụng ASP của họ để PHP. Đó là chi phí-hiệu quả với quy mô hiệu suất Web bằng cách tạo ra một trang trại máy chủ Web của các hệ thống uniprocessor | D90 Java Client Basics and IllegalAccessException. The exceptions must be handled or declared by the method that loads the driver. A simple way to deal with all of them can be try .newInstance catch Exception e Error loading driver 1 Once the driver is loaded you can establish the connection as follows con jdbc mysql host db username user password password The argument to getConnection is a JDBC URL Uniform Resource Locator string. The concept of a URL is used not only with JDBC but in many other client-server protocols. When used with JDBC the format of the URL is protocol subprotocol location For JDBC the protocol is jdbc and subprotocol is the name of the driver. In the case of MySQL Connector J it is mysql. location defines the name or IP address of the server port initial database authentication credentials and a few other connection parameters and should follow this syntax host port db driver_arg driver_arg_val driver_arg driver_arg_ val host is the name or IP address of the database server. The optional port argument defines the TCP IP port to connect to. When this is omitted the default is 3306. There is no need to specify it explicitly unless MySQL is running on a nonstandard port but it does not hurt if you do. The db argument specifies the name of the initial database. The URL can optionally specify additional arguments after the delimiter. Each argument setting is separated by the delimiter. For example jdbc mysql localhost products user test password test The above URL defines a JDBC connection to a MySQL server running on localhost on the default TCP IP port to the database products with the username set to test and the password set to test. The most common URL arguments for MySQL Connector J are user the username for authentication. API Overview 191 password the password to use for authentication. autoReconnect if .