Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all 884 articles
Browse latest View live

mySQL timezone different from client - Java (1 reply)

$
0
0
I have a 5.1 mySQL server where
SELECT @@global.time_zone, @@session.time_zone, @@system_time_zone;
SYSTEM SYSTEM PDT


A containerized application (in docker) is accessing this database, where the timezone is UTC.


The unix box's timezone where everything runs has timezone set to PDT.
Basically, db set to PDT, application set to UTC, and unix os env set to PDT.

Using spring 4 /Java8 and Connector/J 5.1.40

When I retrieve a timestamp field form the database, the field value does not reflect the real value.

In the app where the timezone is UTC, I get java.sql.TimeStamp value with an offset of 0 (it means UTC), but the time value is the PDT value, so when I try to convert it to a java8 ZOnedDateTime value, it thinks field value is already UTC.

Am I missing some settings for whether the jdbc connection string, or else?

ANy help I will appreciate.

Connecting to database using Eclipse (4 replies)

$
0
0
I have problems with accessing my database from Eclipse. Before it worked as a charm, but since I wanted to use the contents of my production database in my development I get the following error message:
java.sql.SQLException: Your password has expired. To log in you must change it using a client that supports expired passwords.

What did I do? I exported my production database using phpMyAdmin, dropped the development database, and imported the script containing the production database data.

At the moment I changed the password policy for my account:
mysql> alter user 'macamba'@'localhost' password expire never;
Query OK, 0 rows affected (0.00 sec)
(0 rows probably because I already executed this command yesterday)

I checked the significant field in the mysql.user table with:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| mydatabase         |
+--------------------+
5 rows in set (0.00 sec)

mysql> use mysql;
Database changed
mysql> select password_expired from user where user='macamba';
+------------------+
| password_expired |
+------------------+
| N                |
+------------------+

Apologies if this question is asked ad infinitum, but I can't find the answer.


1 row in set (0.00 sec)

But still I have no access to the database? What am I missing, doing wrong, need to do to get back my access?

How sharding works with stored procedures? (no replies)

$
0
0
Hi,
We are going to use MySQL Fabric with Connector/J. I'm wondering, is there a way to dispatch stored procedure invocation on particular shard, based on sharding key (passed as procedure argument or somehow separately)?
For example we have a table, sharded between 3 nodes using HASH sharding strategy. All rows with key A are stored on node 1. I'd like to be sure that when I run procedure(A), it applies on node1.

Result query more than one record? (1 reply)

$
0
0
In my Java application I query, and get back one record. What if a new query gets back more records, like a table?

For instance:
SELECT `project`,`activity,
        SEC_TO_TIME(SUM( TIME_TO_SEC(`worked_time`)))
FROM `projects`
WHERE `day` <= "2017-04-09" # Sunday
  AND `day` >= "2017-04-03" # Monday, start week
  AND `active` = 1
GROUP BY `project`, `activity`;

This will result in:
project 		Activity 	worked_time
Flubber			Specific	03:00:00
Promotion activities 	01 Search	01:15:00
Promotion activities 	Travel		03:00:00
UB Development 		Development 	05:00:00
Work and information 	Travel		01:30:00
Work and information 	Symposium 	04:30:00

How do I read this result from the database, and display it into my application?

Failover when read only. (1 reply)

$
0
0
Hi,

I see that the current JDBC connection string with multiple hosts only fails when an error with code 08* is thrown on the current host.

If say you have a current host, that is online but read only then the driver does not fail over instead keeps throwing exceptions.

Is there a way to fail the host when it is set to read-only. ?

Switching database connection in mysql (2 replies)

$
0
0
Here my problem :
I have two mysql databases directory and I want to use one after the other.

The only way that I have actualy found, to switch from one database to the other, is to shutdown the mysql daemon and to start it again pointing to the second database directory.

Are there any other way to perform that ?

Thanks

PS: I'm working on Java application and I do all this action by system access in Java like `Runtime.getRuntime().exec(MY_CMD)`, not by choice. Maybe it's better to use Java Library, I already use hibernate.

Here the code to switch :

new Thread(new Task<T>() {
@Override
protected T call() throws Exception {

// Close the previous database
if (isDaemonRunning()) {
close();
}

// try to open the new one
if (!open()) {
notifyConnectedStatus(false);
return null;
}

// create the hibernate session object
_session = HibernateUtil.getSessionFactory().openSession();

notifyConnectedStatus(true);

// no return is waiting, then return null
return null;
}

}).start();

Here the called methods :

private boolean open() {
int exitVal = 0;
try {
Process p = Runtime.getRuntime().exec(getRunDaemonCmd());
p.waitFor(1, TimeUnit.SECONDS);
if (p.isAlive()) {
return true;
}
exitVal = p.exitValue();
} catch (Exception e) {
_logger.log(Level.SEVERE, e.getMessage(), e);
return false;
}
return (0 == exitVal);
}

private void close() {
do {
try {
if (null != _session) {
_session.close();
_session = null;
}

Process p = Runtime.getRuntime().exec(SHUTDOWN_CMD);
p.waitFor();
} catch (Exception e) {
_logger.log(Level.SEVERE, e.getMessage(), e);
return;
}
} while (isDaemonRunning());
_connected = false;
}


private String[] getRunDaemonCmd() {
return new String[] { MYSQLD, INI_FILE_PARAM + _myIniFile, DATADIR_PARAM + _databasePath };
}

private boolean isDaemonRunning() {
int exitVal = 0;
try {
Process p = Runtime.getRuntime().exec(PING_CMD);
p.waitFor();
exitVal = p.exitValue();
} catch (Exception e) {
_logger.log(Level.SEVERE, e.getMessage(), e);
}
return (0 == exitVal);
}

And Here the constants :

private static final String MYSQLD = "mysqld";
private static final String INI_FILE_PARAM = "--defaults-file=";
private static final String DATADIR_PARAM = "--datadir=";

private static final String MYSQLADMIN = "mysqladmin";

private static final String USER_PARAM = "-u";
private static final String PASSWORD_PARAM = "-p";
private static final String SHUTDOWN = "shutdown";

private static final String PING = "ping";

private static final String[] PING_CMD = new String[] { MYSQLADMIN, PING };

private static final String[] SHUTDOWN_CMD = new String[] { MYSQLADMIN, USER_PARAM + DatabaseSettings.getUser(),
PASSWORD_PARAM + DatabaseSettings.getPassword(), SHUTDOWN };

private String _myIniFile = DatabaseSettings.getDefaultIniFile();

Data truncation: Truncated incorrect DOUBLE value (1 reply)

$
0
0
Bit of a head scratcher. In my Java application I get the following error message:
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value

Searching the Internet I find *) that instead of using AND you should use a comma.

Looking at my logging I see:
class nl.mycompany.tk.RecordsPanel - addNewRow, updating tkTimestamp timestamp ID: '0', perident: 'jdoe', project: 'Promotie jaar 1', activity: '01 Zoeken', timestamp: '2017-04-23 15:43:12.972 in timestamp record
class nl.mycompany.tk.dao.TimestampImplementation - update, SQL query is 'UPDATE tktimestamp SET project=?, activity=?,  timest=? WHERE perident = ?'
class nl.mycompany.tk.dao.TimestampImplementation - update, tTs=timestamp ID: '0', perident: 'jdoe', project: 'Promotie jaar 1', activity: '01 Zoeken', timestamp: '2017-04-23 15:43:12.972
class nl.mycompany.tk.dao.DAOException - DAOException com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'jdoe'

And as far as I see, the used SQL query is correct.
SQL query is 'UPDATE tktimestamp SET project=?, activity=?,  timest=? WHERE perident = ?'

What can I do to solve my problem?

*) Link: https://www.bennadel.com/blog/1503-data-truncation-truncated-incorrect-double-value-when-updating-timestamp.htm]answers

Support for Group Replication with Single Primary (no replies)

$
0
0
I'm looking for support for MySQL Group Replication in single-primary (https://dev.mysql.com/doc/refman/5.7/en/group-replication-single-primary-mode.html) mode in MySQL Connector/J. As far as I understand Connector/J supports multi-master replication since 5.1.27 (https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-master-slave-replication-connection.html#connector-j-multiple-master-replication) only in multi-primary mode. That is, Connector/J is not able to determine the current (single) primary by it self. Is this correct?

Are there any plans to support that in the near future?

From the documentation I imagine, that it should not be to difficult to implement that behaviour myself. Has anybody tried already?

Thanks,
Martin

The time zone CST has different meanings on MySQL Server and on conntector/j (no replies)

$
0
0
I have a MySQL Server installed on Linux. The timezone of the Linux is CST which means China Standard Time. But the CST explain as Central Standard Time in java side.

I looked at the source code, the CST is read from /etc/localtime file at server side. And com.mysql.cj.mysqla.MysqlaSession.configureTimezone() read the system_time_zone variable from the server side in connector/j v6.0.x. com.mysql.cj.jdbc.util.TimeUtil.loadTimeZoneMappings(ExceptionInterceptor) initialize all time zones to timeZoneMappings variable use properties file and java.util.TimeZone.getAvailableIDs(). In java.util.TimeZone, CST means Center Standard Time which has 13 or 14 hours behind China Standard Time.

I think it is a serious defect. I suggest should MySQL use offset to represent a timezone instead of using a string format. Or if want fix the defect quickly, should simplely add a line "CST=Asia/Shanghai" to /com/mysql/cj/jdbc/util/TimeZoneMapping.properties file.

org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial connections of pool. (1 reply)

$
0
0
when I use tomcat jdbc to connect mysql,the error happened:
tomcat-jdbc 8.5.15
mysql-connector-java 6.0.6
mysql 5.7.18

error is :
--> SQLCODE : 0
--> SQLSTATE: 08001
--> Message : Could not create connection to database server.
org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial connections of pool.
java.sql.SQLNonTransientConnectionException: Could not create connection to database server.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:526)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:505)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:479)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:1779)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1596)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:633)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:347)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:219)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:310)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:735)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:667)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:482)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnectionAsync(DataSourceProxy.java:142)

Db Pool Properties is below:
ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; driverClassName=com.mysql.cj.jdbc.Driver; maxActive=1000; maxIdle=100; minIdle=10; initialSize=10; maxWait=10000; testOnBorrow=true; testOnReturn=false; timeBetweenEvictionRunsMillis=5000; numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=30000; testWhileIdle=false; testOnConnect=false; password=********; url=jdbc:mysql://10.0.xxx.xxx:3306/xxxx?useSSL=false&useCursorFetch=true&defaultFetchSize=1000&zeroDateTimeBehavior=convertToNull; username=sa; validationQuery=SELECT 1; validationQueryTimeout=60; validatorClassName=null; validationInterval=5000; accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; removeAbandonedTimeout=60; logAbandoned=false; connectionProperties=null; initSQL=null; jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer; jmxEnabled=true; fairQueue=true; useEquals=true; abandonWhenPercentageFull=0; maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null; suspectTimeout=0; alternateUsernameAllowed=false; commitOnReturn=false; rollbackOnReturn=false; useDisposableConnectionFacade=true; logValidationErrors=false; propagateInterruptState=false; ignoreExceptionOnPreLoad=false; useStatementFacade=true;

Client cert required by Connector/J when server does not verify it? (no replies)

$
0
0
Hello!

The MySQL server I'm connecting to via SSL with Connector/J is configured not to verify the certificate presented by the client. In

https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-using-ssl.html

it says I have to have a client certificate and instructs me to create a keystore containing it. Does this apply even when the server does not verify the certificate? In other words, why do I need to create and provide the keystore file when the server is not set up to verify the client certificate? Basically, I want the client to connect to the MySQL server like a web browser typically connects to an HTTPS server: the web browser verifies the certificate presented by the server, and the web browser does not send a certificate to the server to verify. Can I do the same with a Connector/J client such that I don't have to create and provide the client certificate keystore?

Thank you!

Lewis

mysql-connector-java-5.1.42-bin.jar won't run (no replies)

$
0
0
Downloaded Platform Independent Connector/J 5.1.42 (Zip), extracted, and the mysql-connector-java-5.1.42-bin.jar executable won't run to install the connector. (Windows 10)
Any suggestions appreciated, thanks!

Master/Slave Replication with Down Slaves (no replies)

$
0
0
Hello,

I am attempting to use the com.mysql.jdbc.ReplicationDriver on a web application and everything works great when my code/system is on the "happy path". My reads go to the replicas, my writes go to the master. My problem is that I might be misunderstanding how the driver is supposed to operate when a slave goes down. I am current using tomcat to manage the connection pool and here is my config....

<Resource auth="Container"
driverClassName="com.mysql.jdbc.ReplicationDriver"
defaultAutoCommit="false"
initialSize="3"
logAbandoned="false"
maxActive="200"
maxIdle="10"
maxWait="10000"
name="jdbc/mydb"
removeAbandoned="true"
testOnBorrow="true"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
username="username"
password="password"
url="jdbc:mysql:replication://localhost:3306,2.2.2.222:3306/mydb?autoReconnect=true&amp;allowSlaveDownConnections=true&amp;readFromMasterWhenNoSlaves=true&amp;connectTimeout=15000&amp;socketTimeout=15000"
validationQuery="/* ping */ SELECT 1"/>


My issue is that:

1. Tomcat won't start when the slave 2.2.2.222 is down. Is there a setting to allow for this?

2. If a node goes down at any point does the driver blacklist them, because it seems if a kill a node that my application hangs on queries that are going to the read only replica. Is there a way to have it ban failed nodes?

I guess in general does Master/Slave Replication gracefully handle failed slave nodes?

Thanks

Java and mysql high concurrency bottlenecks solutions (no replies)

$
0
0
We are developing a vehicle tracking system in which several GPS devices keep sending their GPS locations to the server using Tcp connection. Tcp communicator decodes the GPS location and inserts that data into the database and before inserting we do some selects and updates but all I do it using prepared statements. Right now, one thread of TCP communicator serves one device request.Immediately after creating the thread we get one connection from the pool. After decoding the GPS data is where we perform the multiple select, update and insert for each data. As number of devices are increasing, the number of concurrent connections to our Mysql database are also increasing. We are now anticipating 30 to 50 thousand devices pumping data every minute.Currently below is how the snippet of the whole tcp communicator looks like. I know eventually we will facing both insert bottleneck into the database. What will the best solution to over come this scenario? Will Java also be able to handle this many concurrency ?

public class comm8888 {
HikariDataSource connectionPool = null;
private Socket receivedSocketConn1;
ConnectionHandler(Socket receivedSocketConn1) {
this.receivedSocketConn1=receivedSocketConn1;
}
Connection dbconn = null;
public void run() { // etc
DataOutputStream w = null;
DataInputStream r = null;
String message="";
receivedSocketConn1.setSoTimeout(60000);
dbconn = connectionPool.getConnection();
dbconn.setAutoCommit(false);
try {
w = new DataOutputStream(new BufferedOutputStream(receivedSocketConn1.getOutputStream()));
r = new DataInputStream(new BufferedInputStream(receivedSocketConn1.getInputStream()));
while ((m=r.read()) != -1){
//multiple prepared based sql select,update and insert here.
}
}
finally{
try {
if ( dbconn != null ) {
dbconn.close();
}
}
catch(SQLException ex){
ex.printStackTrace();
}
try{
if ( w != null ){
w.close();
r.close();
receivedSocketConn1.close();
}
}
catch(IOException ex){
ex.printStackTrace(System.out);
}
}
}
}


public static void main(String[] args) {
new comm8888();
}
comm8888() {
try {

HikariConfig config = new HikariConfig();
config.setJdbcUrl("jdbc:mysql://localhost:3306/testdata");
config.setUsername("****");
config.setPassword("****");
config.setMaximumPoolSize(20);
connectionPool = new HikariDataSource(config); // setup the connection pool
}
catch (Exception e) {
e.printStackTrace(System.out);
}
try
{
final ServerSocket serverSocketConn = new ServerSocket(8888);
while (true){
try {
Socket socketConn1 = serverSocketConn.accept();
new Thread(new ConnectionHandler(socketConn1)).start();
}
catch(Exception e){
e.printStackTrace(System.out);
}
}
}
catch (Exception e) {
e.printStackTrace(System.out);

}

}
}

[Q] Best practice about timezone conversion. (no replies)

$
0
0
Hello, members.

I would like to know the best practice.
Could you tell me what parameters I should set in the latest Connector/J(5.1.42)?

Parameters

* useLegacyDatetimeCode
* serverTimeZone
* noTimezoneConversionForDateType
* cacheDefaultTimezone

Environment.

* Client and server time zones differ. (ex. Server: UTC, Client Asia/Tokyo)
* Client and server time zones are the same. (ex. Server and Client is Asia/Tokyo).

It worked as I expected in the Connector/J version 5.1.34.

* Client and server time zones differ.
useLegacyDatetimeCode: false
serverTimeZone: UTC

* Client and server time zones are the same.
no options

The noTimezoneConversionForDateType and cacheDefaultTimezone introduced in the 5.1.35.
But I can't find a document about those parameters combination settings.

https://dev.mysql.com/doc/relnotes/connector-j/5.1/en/news-5-1-35.html

noTimezoneConversionForDateType and cacheDefaultTimezone:
For improving Connector/J's time zone support;
see the changelog entry for Bug #18028319/Bug #71084 below for details

Best regards

--
Hiroyuki Sato.

Can someone tell me what's wrong with my sql statement ? (no replies)

$
0
0
I got this error which I have been trying the whole day long but I still can't resolve it. Hope to get some help here.

The error is
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES92' at line 1

And here's my code :

connection.commit();
ResultSet tableKeys = ps.getGeneratedKeys();

int generatedId = 0;
while(tableKeys.next())
generatedId = tableKeys.getInt(1);
stmt3 = (Statement) connection.createStatement();
String sql3 =
"INSERT INTO project.tutor_subject (tutor_id)"
+ "VALUES"
+ generatedId;

jdbc with no default db have one extra null byte cause handshake fail (no replies)

$
0
0
we are using jdbc to connect a mysql-proxy,found that jdbc is different from mysql protocal when dealing no default db connection


here is the mysql protocal,Protocol::HandshakeResponse41

if CLIENT_CONNECT_WITH_DB is set,then have a string[NULL],if not set,then have nothing


however,in jdbc source code,we found this: in function

proceedHandshakeWithPluggableAuthentication

if (this.useConnectWithDb) {
last_sent.writeString(database, enc, this.connection);
} else {
/* For empty database */
last_sent.writeByte((byte) 0);
}

if CLIENT_CONNECT_WITH_DB is not set,jdbc write a extra null byte. we use tcpdump verify this.


is this a bug?

Slow Concurrent Updates (no replies)

$
0
0
Hi Guys,

We have a requirement for a high concurrency table 100+ requests per second.

It is a table that contains a bunch of unique key-codes, these are assigned a request_guid as they are requested.

The table contains an integer primary key, a unique keycode and a null request_guid.

We are running the below query, it works ok with 10,000 records however with 1million+ records it grinds to a halt and each update takes 16+ seconds.

Table:
(id INT
keycode VARCHAR(50)
request_guid VARCHAR(45) NULL)

Concurrant Query:
UPDATE coupon
SET request_guid = ?
WHERE request_guid IS NULL
ORDER BY RAND() LIMIT 1;

The RAND() order is being used otherwise we get locking issues when the same row is trying to be updated simultaneously.

Can anyone think of a better way of doing this to improve performance? Potentially the keys should be in a separate table?

I hope the above makes sense, thanks for your help!

Cheers,

Felix

connectionCollation being igored (no replies)

$
0
0
Hi there,

we do have a mySql (5.6.37) db with the following server settings:

character-set-server = 'utf8mb4'
collation-server = 'utf8mb4_bin'

table(s) collation is also set to utf8mb4_bin.


Now for the JDBC (mysql-connector-java-5.1.39-bin.jar) client connection we use these settings:

<connection-property name="useUnicode">true</connection-property>
<connection-propertyname="connectionCollation">UTF8MB4_GENERAL_CI</connection-property>
<connection-property name="characterSetResults">utf8</connection-property>
<driver>MySQL</driver>

(Alternatively I've tried this as well: <connection-url>jdbc:mysql://x.x.x.x:3306/test?useUnicode=true&amp;connectionCollation=UTF8MB4_GENERAL_CI&amp;characterSetResults=utf8&amp;characterEncoding=utf8</connection-url>
)

The client connection properties seem to be ignored since any query initiated through this connection is still case sensitive (due to the utf8mb4_bin).

If I use the COLLATE directly at a query (e.g. "select * from table where value = 'aa' COLLATE utf8mb4_general_ci") everything works as expected and results with 'AA', 'Aa', 'aA' and 'aa' are returned.

Now I wonder why the JDBC client connectionCollation setting is being ignored. With this setting in place, I'd expect that I don't have to use the "select ... COLLATE utf8mb4_general_ci" clause.

Any thoughts on that?

Regards,

Stefan

Caused by: org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect (no replies)

$
0
0
hi expert,

I have been having trouble in this hibernate connection to MySQL database but I can't figure out what cause the error.

Hope someone can advise me.

Tks.

Here's my hibernate.cfg.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"&gt;


<hibernate-configuration>
<session-factory>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<property name="use_sql_comments">false</property>

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:8013/abc"</property>
<property name="connection.username">root</property>
<property name="connection.password">root/</property>

<!-- add classes to map from here -->
<mapping class="model.Tutor" />
<mapping class="model.Subject" />
</session-factory>
</hibernate-configuration>

My j connector is in the build path.

So, why is it that it is not connecting ?
Viewing all 884 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>