Solution
Even though there is no create database VI, you can use the
DB Tools Execute Query VI to execute the "
CREATE DATABASE db_name" MySQL command from LabVIEW.
You would need a valid connection to the MySQL driver to be able to run the query. Two methods that can be used for this are:
2. In LabVIEW, place the
DB Tool Open Connection VI and enter the System DSN's name, created in the previous step, in the connection information terminal.
3. Use the DB Tools Execute Query VI to create the database.
- Using a connection string:
1. Input an appropriate connection string in the connection information terminal, without specifying a database. For example:
Driver={MySQL ODBC 8.0 ANSI Driver}; Server=localhost; User=root; Password=admin;
2. Use the DB Tools Execute Query VI to create the database.