chore: Update docs on MySQL recommended driver (#14826)

* Update docs

* Update docs/src/pages/docs/Connecting to Databases/mysql.mdx

Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>

* Update docs/src/pages/docs/Connecting to Databases/mysql.mdx

Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>

Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
This commit is contained in:
Beto Dealmeida
2021-05-25 14:59:05 -07:00
committed by GitHub
parent 8b1a117d24
commit 45020860d5

View File

@@ -8,12 +8,12 @@ version: 1
## MySQL
The recommended connector library for MySQL is [mysql-connector-python](https://pypi.org/project/mysql-connector-python/).
The recommended connector library for MySQL is `[mysqlclient](https://pypi.org/project/mysqlclient/)`.
Here's the connection string:
```
mysql+mysqlconnector://{username}:{password}@{host}/{database}
mysql://{username}:{password}@{host}/{database}
```
Host:
@@ -21,3 +21,9 @@ Host:
- For On Prem: IP address or Host name
- For Docker running in OSX: `docker.for.mac.host.internal`
Port: `3306` by default
One problem with `mysqlclient` is that it will fail to connect to newer MySQL databases using `caching_sha2_password` for authentication, since the plugin is not included in the client. In this case, you should use `[mysql-connector-python](https://pypi.org/project/mysql-connector-python/)` instead:
```
mysql+mysqlconnector://{username}:{password}@{host}/{database}
```