# Class MySQLDataSource

java.lang.Object
org.mariadb.jdbc.MariaDbDataSource
org.mariadb.jdbc.MySQLDataSource

All Implemented Interfaces:
  `Wrapper, CommonDataSource, ConnectionPoolDataSource, DataSource, XADataSource`

public class MySQLDataSource extends MariaDbDataSource
Deprecated.
use class MariaDbDataSource directly
Keep the class name for compatibility

## Constructor Summary

Constructors
Constructor
Description
`MySQLDataSource()`
Deprecated.
Default constructor.
`MySQLDataSource(String url)`
Deprecated.
`MySQLDataSource(String hostname, int port, String database)`
Deprecated.
Constructor.

## Method Summary

### Methods inherited from class MariaDbDataSource

`getConnection, getConnection, getDatabaseName, getLoginTimeout, getLogWriter, getParentLogger, getPooledConnection, getPooledConnection, getPort, getPortNumber, getServerName, getUrlParser, getUser, getUserName, getXAConnection, getXAConnection, initialize, isWrapperFor, setDatabaseName, setLoginTimeout, setLogWriter, setPassword, setPort, setPortNumber, setProperties, setServerName, setUrl, setUser, setUserName, unwrap`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface CommonDataSource

`createShardingKeyBuilder`

### Methods inherited from interface ConnectionPoolDataSource

`createPooledConnectionBuilder`

### Methods inherited from interface DataSource

`createConnectionBuilder`

### Methods inherited from interface XADataSource

`createXAConnectionBuilder`

## Constructor Details

### MySQLDataSource

public MySQLDataSource(String hostname, int port, String database)
Deprecated.
Constructor.

Parameters:
  `hostname` - hostname (ipv4, ipv6, dns name)
  `port` - server port
  `database` - database name

### MySQLDataSource

public MySQLDataSource(String url)
Deprecated.

### MySQLDataSource

public MySQLDataSource()
Deprecated.
Default constructor. hostname will be localhost, port 3306.