Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create database using soci in mysql? #1149

Closed
q2013 opened this issue May 16, 2024 · 1 comment
Closed

How to create database using soci in mysql? #1149

q2013 opened this issue May 16, 2024 · 1 comment
Labels

Comments

@q2013
Copy link

q2013 commented May 16, 2024

I want to connect to the mysql server with the soci library and use it to create a database.(like 'CREATE DATABASE person;') I find that I have to create a session with 'dbName'.
img_v3_02au_e82591b3-e18d-4cd4-a7d7-bb218e1982dg

I can do this without passing dbName so that I can connect to the default database when I call mysql_real_connect(). What should I do next to create a new database and switch to it? Or is there another way?
image

@vadz
Copy link
Member

vadz commented May 17, 2024

I don't think there is another way, you need to be able to connect to "mysql" database.

@vadz vadz closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
@vadz vadz added the MySQL label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants