{"data":{"markdownRemark":{"html":"<h2 id=\"enabling-mysql-output\"><a href=\"#enabling-mysql-output\" aria-hidden=\"true\" class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Enabling MySQL Output</h2>\n<p>The Simudyne SDK will not export files to MySQL by default. To enable, set the value of the config field <code class=\"language-text\">core.sql-export.enabled</code> in the <code class=\"language-text\">simudyneSDK.properties</code> file to true. (<a href=\":version/reference/modelling/model-configuration\">More about Model Config</a>.)</p>\n<p>You will also need to specify the JDBC format URL for connecting to the MySQL database. This can be done via the config field <code class=\"language-text\">core.sql-export-path</code> in the format <code class=\"language-text\">jdbc:mysql://localhost:3306/sdk</code> with sdk being any Database name. It is recommended that you have authentication via the  fields <code class=\"language-text\">core.export.username</code> and <code class=\"language-text\">core.export.password</code>.</p>\n<p>If you wish there are multiple ways you can avoid storing the username and password in the plain-text file format of the <code class=\"language-text\">simudyneSDK.properties</code> file. As you are able to set the configuration of these properties at run-time or via command line it would be advisable to either set these properties as part of a secure script prior to running - or to include a check in your code for retreiving the username and password that can set the properties directly via <code class=\"language-text\">getConfig</code>. </p>\n<p>By default when running a new table will be created for each outputted data type as serialized, and this will also include outputting multiple simulation sessions and runs to a new table. The SimudyneSDK will not update or remove data from existing runs/sessions; however the account created for usage with the Simudyne SDK will need to be able to create and update table information.</p>","headings":[{"value":"Enabling MySQL Output","depth":2}],"frontmatter":{"title":"MySQL","toc":null,"experimental":null}},"site":{"siteMetadata":{"title":"Simudyne Docs","latestVersion":"2.6"}}},"pageContext":{"absolutePath":"/home/vsts/work/1/s/content/2.6/reference/data_export/sql.md","versioned":false,"version":"2.6","kind":"reference","pagePath":"/reference/data_export/sql","chronology":{"prev":{"name":"CSV","path":"/reference/data_export/csv"},"next":{"name":"Hive via Parquet","path":"/reference/data_export/hive"}},"lastUpdated":"2026-04-21T13:56:54.868Z"}}