Forum Discussion

sprice090161's avatar
sprice090161
Contributor
5 years ago

Is there a supported procedure to configure a Datasource to connect to AWS Aurora DB?

I'd like to connect to Aurora DB from my soapUI test case  but, I'm not sure how to do it. I'm pretty confident that the MySql Driver should support the connection after reading the AWS doc. Will the test step require an  aws session token like a REST teststep does?

  • Hey sprice090161,

    Ive done a bit of reading and amazom suggest using mariadb JDBC driver.

    If you have a look at the following link, this defines how to createa new db connection in any generic db interrogation tool. Use this approach to create your aurora connection in ReadyAPI!/SoapUI.

    https://aws.amazon.com/blogs/database/using-the-mariadb-jdbc-driver-with-amazon-aurora-with-mysql-compatibility/

    The page indicates you just need the host/servername, port, db, db username, db password

    The page also defines the parms for the connection URL as well as a link to use thr mariadb jdbc driver .jar.

    Youll need to ensure your java is the correct version the .jar file uses.

    Youll need to ensure the java is the same "bit type" as the version of ReadyAPI!/SoapUI you are using (both need to be either 64bit or 32bit/x86)

    Once youve ensured your java is correct and youve copied the .jar into the correct directory (im on my phone right now so going on memory i think its /ext/lib.....but double check i know the postgresql driver is installed in the correct directory when the application is installed....so stick the .jar file in that directory).

    Cant remember if mariadb already has a default connection setup by default in Preferences >> JDBC when the app is installed. If its not, youll have to setup a new connection string (use the jdbc connection string URL defined in the link i provided).

    I find when creating a new db connection from scratch that i find it easier if i create a new connection using JDBC in a generic db interrogation tool. I then replicate that config in ReadyAPI!/SoapUI.

    Ok. Thats it....i think ive covered off everything you need.

    You might be able to query the database via REST instead of JDBC, if the JDBC option doesnt work, come back and we can discuss connecting via REST instead of JDBC.

    Ta

    Rich
  • richie's avatar
    richie
    Community Hero
    Hey sprice090161,

    Ive done a bit of reading and amazom suggest using mariadb JDBC driver.

    If you have a look at the following link, this defines how to createa new db connection in any generic db interrogation tool. Use this approach to create your aurora connection in ReadyAPI!/SoapUI.

    https://aws.amazon.com/blogs/database/using-the-mariadb-jdbc-driver-with-amazon-aurora-with-mysql-compatibility/

    The page indicates you just need the host/servername, port, db, db username, db password

    The page also defines the parms for the connection URL as well as a link to use thr mariadb jdbc driver .jar.

    Youll need to ensure your java is the correct version the .jar file uses.

    Youll need to ensure the java is the same "bit type" as the version of ReadyAPI!/SoapUI you are using (both need to be either 64bit or 32bit/x86)

    Once youve ensured your java is correct and youve copied the .jar into the correct directory (im on my phone right now so going on memory i think its /ext/lib.....but double check i know the postgresql driver is installed in the correct directory when the application is installed....so stick the .jar file in that directory).

    Cant remember if mariadb already has a default connection setup by default in Preferences >> JDBC when the app is installed. If its not, youll have to setup a new connection string (use the jdbc connection string URL defined in the link i provided).

    I find when creating a new db connection from scratch that i find it easier if i create a new connection using JDBC in a generic db interrogation tool. I then replicate that config in ReadyAPI!/SoapUI.

    Ok. Thats it....i think ive covered off everything you need.

    You might be able to query the database via REST instead of JDBC, if the JDBC option doesnt work, come back and we can discuss connecting via REST instead of JDBC.

    Ta

    Rich
    • sprice090161's avatar
      sprice090161
      Contributor

      Nice! Thank you Rich. I'll report back 😉

      I know that my devs are connecting directly from MySQL Workbench, so I'll bet either driver will work.

      • sonya_m's avatar
        sonya_m
        SmartBear Alumni (Retired)

        Awesome explanation Richie, thank you!

         

        Hi sprice090161 ! Please let us know if you had a chance to try this advice and whether it helped🙂