Search code examples
javamysqljdbcjarimporterror

What is the name of com.mysql's datasource implementation?


I just installed the official mysql jdbc driver, and I cannot find the class name for the datasource implementation.
I saw in a site that it was com.mysql.jdbc.jdbc2.optional.MysqlDataSource, but eclipse does not recognize it. (trying to import it gives me an error)
I tried reading the documentation, but I only found the name for the Driver. I know there is another thread asking the same question, but it does not answer my question.
Please help me.
Thank you for your time.


Solution

  • With MySQL Connector/J 8.0 the import is

    import com.mysql.cj.jdbc.MysqlDataSource;