Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Mysql DB virtualize

rvmseng
rvmseng Posts: 89
edited January 2021 in Virtualize

Hello team,

I want to know what is jdbc url for mysql?
I use below configuration but I face with error

jdbc.driverClassName=com.parasoft.xtest.jdbc.virt.driver.JDBCProxyDriver
jdbc.url=jdbc:parasoft:proxydriver:jdbc:mysql://localhost:3306/mydb
jdbc.username=sa
jdbc.password=123

I think below line is invalid, but I can not find any useful information about mysql db virtualize in your user guid

jdbc:parasoft:proxydriver:jdbc:mysql://localhost:3306/mydb

Tagged:

Comments

  • rvmseng
    rvmseng Posts: 89

    base on below picture I configured Parabank jdbc.properties file to read data from mysql but i face with below error

    Cannot create JDBC driver of class 'com.parasoft.xtest.jdbc.virt.driver.JDBCProxyDriver' for connect URL 'jdbc:mysql://localhost:3306/parabank'
    java.sql.SQLException: No suitable driver
    

    also I attach error log file

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited January 2021

    Did you miss any of the steps here?
    JDBC Configuration for ParaBank

    There are some steps besides modifying the jdbc.properties file, like coping the ParasoftJDBCDriver.jar. I imagine you also need to copy a MySQL jar since ParaBank doesn't use MySQL but HyperSQL.

  • rvmseng
    rvmseng Posts: 89

    Dear Benken,

    my simple question is this if I have a Mysql db and I want to virtuale it first step is copy jar file after that I must change config files and my problem is for below line how I set it? what is valid "jdbc.url" for mysql url? for example my URL is "mysql://localhost:3306/mydb" how I can change it ?

    jdbc.url=jdbc:parasoft:proxydriver:jdbc:mysql://localhost:3306/mydb

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    jdbc.url=jdbc:parasoft:proxydriver:jdbc:mysql://localhost:3306/mydb

    According to docs, format is this:
    jdbc:parasoft:proxydriver:[original driver fully qualified class name]:@[original driver connection URL]

    So, it looks like you are missing "original driver fully qualified class name" part. For the MySQL it is something like "com.mysql.jdbc.Driver"

  • rvmseng
    rvmseng Posts: 89

    Thank you so lot.