-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Documentation.need to be updated in the part of connection to database specially for my sql as below #18297
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
Comments
Hi @mina20088. I don't use MySQL ... but for PostgreSQL I just use e.g. Could you please take a look to see if this is specific for MySQL or if maybe something in your app has something to do with this? Thanks! |
As far as I know, the serverVersion is not required. If it's not set by a setting, Doctrine will connect to the database in order to figure out the server version. However, as this means it is connecting to the database more often (e.g. during cache warmup, as it needs to know the version to generate the cache), it is recommended to provide a server version. |
yes ... but it's enough to say "version = 13", "version = 8" or do you need to say "version = 13.4.1", "version = 8.0.32", etc.? At least for PostgreSQL is not needed ... but I don't know about MySQL. |
You should always be as precise as possible (also with PostgreSQL), as this will make Doctrine choose the best platform as possible (sometimes, a patch version introduces a small BC break that requires Doctrine to slightly change its tooling). https://github.com/doctrine/dbal/blob/3.6.x/src/Driver/AbstractMySQLDriver.php#L34-L78 |
MySQL should be precises in defining the version |
I have tried it but it never works untill I defined the version that why I made a pull request to update this section |
@javiereguiluz hi I will make a new application and try this setup again and give a feed back but unfortunately I don't use other drivers like postgres oe SQLite but this issue is happing on the MySQL |
I cannot reproduce this issue. When I start a new demo application, spin up a MySQL database and configure the env var without server version, it correctly creates the database:
Please use one of the support channels (https://symfony.com/support) if you need more help getting this working. |
I created a new one and th same issue is there |
#The Connection Query string must contains the exact mysql version as an example if you have mysql version 8.0.32 # DATABASE_URL="mysql://db_user:[email protected]:3306/db_name?serverVersion=8.0.32" #if you didn`t do that symfony will not create the database for you and you will not have any access
The text was updated successfully, but these errors were encountered: