v5:database:mysql
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v5:database:mysql [2023/05/10 09:41] – [mysqli driver] mysqlnd required since 5.22 dregad | v5:database:mysql [2026/01/30 03:48] (current) – [Connecting With SSL] mnewnham | ||
|---|---|---|---|
| Line 54: | Line 54: | ||
| </ | </ | ||
| ==== Connecting With SSL ==== | ==== Connecting With SSL ==== | ||
| - | From ADOdb version 5.21, you can make an SSL connection to MySQL in the following way: | + | From ADOdb version 5.23.10, you make an SSL connection to MySQL in the following way: |
| <code php> | <code php> | ||
| Line 60: | Line 60: | ||
| * Enable ADOdb | * Enable ADOdb | ||
| */ | */ | ||
| - | $db = newAdoConnection(' | + | $db = newAdoConnection(' |
| /* | /* | ||
| * Set the SSL parameters | * Set the SSL parameters | ||
| */ | */ | ||
| - | $db->ssl_key | + | $db->setConnectionParameter(' |
| - | $db-> | + | ' |
| - | $db-> | + | ' |
| - | $db-> | + | ' |
| - | $db-> | + | ' |
| + | ' | ||
| + | ] | ||
| + | ); | ||
| /* | /* | ||
| Line 81: | Line 84: | ||
| * Enable ADOdb | * Enable ADOdb | ||
| */ | */ | ||
| - | $db = newAdoConnection(' | + | $db = newAdoConnection(' |
| $database = ' | $database = ' | ||
| Line 88: | Line 91: | ||
| $password = ' | $password = ' | ||
| - | $db->ssl_ca | + | $db->setConnectionParameter( |
| + | ' | ||
| + | [ | ||
| + | | ||
| + | ] | ||
| + | ); | ||
| + | $db-> | ||
| + | ' | ||
| + | ); | ||
| + | |||
| /* | /* | ||
| * Open the connection | * Open the connection | ||
| Line 96: | Line 108: | ||
| </ | </ | ||
| - | {{tag>[MySQL windows unix supported tier1]}} | + | ==== Forcing emulated prepared statements ==== |
| + | |||
| + | ADOdb 5.22 introduced support for " | ||
| + | [[https:// | ||
| + | see [[https:// | ||
| + | Before that, parameterized queries were emulated, which was a potential security risk. | ||
| + | |||
| + | When using database engines pretending to be MySQL but not implementing prepared statements such as | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | it is possible((starting with ADOdb 5.22.8)) to force usage of emulated queries (i.e. reverting to behavior of ADOdb 5.21 and older) by setting the '' | ||
| + | |||
| + | <code php> | ||
| + | $db = newAdoConnection(' | ||
| + | $db-> | ||
| + | $db-> | ||
| + | $db-> | ||
| + | </ | ||
| + | |||
| + | {{tag> | ||
| {{htmlmetatags> | {{htmlmetatags> | ||
| + | |||
v5/database/mysql.1683704516.txt.gz · Last modified: by dregad
