I’m making a program that needs to interact with a MySQL database on the client’s machine but I don’t know how to create a MySQL schema (and instance if necessary) on the computer. Since I can’t connect to the database itself because it doesn’t exist yet I’m guessing I need to send a message to the command console of the client’s computer and hoping he has MySQL in his path so I can execute a create instance if not exist and then create the schema.
Share
No, don’t do it that way. Generally with remote installations that require a MySQL database the procedure goes something like this:
.sqlfile is, instruct them to install it themself, and then ask the user for the user, password, and database name.Doing it this way allows the user to use any database they want, on any machine they want, using any level of security they want.
And you don’t want to do this via a command line program, you’ll want to do this programatically (by connecting to the server using C# and executing the statements directly).