ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:database:mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v5:database:mysql [2018/07/27 04:17] – [Usage] mnewnhamv5:database:mysql [2023/05/10 09:41] (current) – [mysqli driver] mysqlnd required since 5.22 dregad
Line 2: Line 2:
 ~~NOTOC~~ ~~NOTOC~~
 ===== mysqli driver ===== ===== mysqli driver =====
 +
 <WRAP right box round 300px> <WRAP right box round 300px>
 +
 == Specification == == Specification ==
 ^Driver Name|mysqli| ^Driver Name|mysqli|
-^Data Provider|mysql|+^Data Provider|[[v5:userguide:learn_extensions:new_driver#Understanding The Data Provider|mysql]]|
 ^Status|Active((This driver is actively supported by ADOdb project members))| ^Status|Active((This driver is actively supported by ADOdb project members))|
 ^Windows|Yes| ^Windows|Yes|
Line 11: Line 13:
 ^ADOdb V5|Yes| ^ADOdb V5|Yes|
 ^ADOdb V6|Yes| ^ADOdb V6|Yes|
 +
 == Alternatives == == Alternatives ==
 [[v5:database:pdo#pdo_mysql|PDO driver for MySQL]] [[v5:database:pdo#pdo_mysql|PDO driver for MySQL]]
 +
 +== See Also ==
 +[[v5:reference:connection:setconnectionparameter#mysql|setConnectionParameter()]]
 </WRAP> </WRAP>
  
Line 20: Line 26:
   * [[http://percona.com|Percona]]   * [[http://percona.com|Percona]]
  
-This preferred driver uses the PHP **mysqli** interface and supports all table types, with full support for transactions and rollback when the table type supports it. +This driver uses the PHP **mysqli** interface and supports all table types, with full support for transactions and rollback when the table type supports it. 
  
-This driver replaces both **mysql** and **mysqlt** drivers. +It replaces [[v5:database:mysql_legacy|]] (**mysql****mysqlt** and **mysqlpo**).
-------------------------------------------- +
-===== Migrating To The mysqli driver ===== +
-If you are still using the //**mysql**// or//**mysqlt**// drivers you should be planning on migrating to the mysqli driverSupport for both drivers is built into PHP up to version PHP 5.4. From an ADOdb standpoint, it is simply a case of switching from +
  
 +<WRAP important>
 +Starting with ADOdb 5.22, the mysqli driver requires the [[https://www.php.net/manual/en/book.mysqlnd.php|MySQL Native Driver (Mysqlnd)]]
 +</WRAP>
  
  
-  $db = newAdoConnection('mysql'+-------------------------------------------
-to +
-  $db = newAdoConnection('mysqli')+
  
 ===== Driver Specific Issues ===== ===== Driver Specific Issues =====
Line 61: Line 65:
 */ */
 $db->ssl_key    = "key.pem"; $db->ssl_key    = "key.pem";
-$db->ssl_cer    = "cert.pem"; +$db->ssl_cert   = "cert.pem"; 
 $db->ssl_ca     = "cacert.pem"; $db->ssl_ca     = "cacert.pem";
 $db->ssl_capath = null;  $db->ssl_capath = null; 
Line 72: Line 76:
 </code> </code>
  
 +==== Connecting To A Microsoft Azure MySQL Instance ====
 +<code php>
 +/*
 +* Enable ADOdb
 +*/
 +$db = newAdoConnection('mysqli')
  
-===== mysql driver ===== +$database 'employees'; 
-<WRAP right box round 300px> +$host     'my-corporation.mysql.database.azure.com'; 
-== Specification == +$user     = 'corpuser'; 
-^Driver Name|mysql| +$password = 'Qzrt6r55geRt!';
-^Data Provider|mysql)| +
-^Status|Obsolete((This driver will be removed in ADOdb version 6))| +
-^Windows|Yes| +
-^Unix|Yes| +
-^ADOdb V5|Yes| +
-^ADOdb V6|No| +
-</WRAP> +
-This driver uses the PHP original mysql driver and only provides support to non-transactional tables such as MyIsam+
-  +
-  * It cannot be used with the PHP 'ImprovedMySQL driver.  +
-  * The PHP driver is deprecated as of PHP Version 5.5 and will be removed in PHP version 7.  +
-  * This driver is deprecated as of ADOdb version 5.20 and will be removed in ADOdb version 6.0.+
  
 +$db->ssl_ca     = '/opt/azure-cert/DigiCertGlobalRootCA.crt.pem';
  
------------------------------------------------ +/* 
-===== mysqlt driver ===== +Open the connection 
-<WRAP right box round 300px> +*/ 
-== Specification == +$db->connect($host, $user, $password, $database); 
-^Driver Name|mysqlt| +</code>
-^Data Provider|mysql)| +
-^Status|Obsolete((This driver will be removed in ADOdb version 6))| +
-^Windows|Yes| +
-^Unix|Yes| +
-^ADOdb V5|Yes| +
-^ADOdb V6|No| +
-</WRAP> +
-This driver uses the PHP original mysql driver and provided support to transactional tables such as InnoDB.  +
- +
-  It cannot be used with the PHP 'improved' MySQL driver.  +
-  The PHP driver is deprecated as of PHP Version 5.5 and will be removed in PHP version 7.  +
-  * This driver is deprecated as of ADOdb version 5.20 and will be removed in ADOdb version 6.0 +
- +
--------------------------------- +
-===== mysqlpo driver ===== +
-<WRAP right box round 300px> +
-== Specification == +
-^Driver Name|mysqlpo| +
-^Data Provider|mysql)| +
-^Status|Obsolete((This driver will be removed in ADOdb version 6))| +
-^Windows|Yes| +
-^Unix|Yes| +
-^ADOdb V5|Yes| +
-^ADOdb V6|No| +
-</WRAP> +
-This driver duplicates the functionality of the mysqlt driver and is not maintained. It will be removed in ADOdb version 6.0 +
-------------------------------------------+
  
-{{tag>[MySQL windows unix supported]}}+{{tag>[MySQL windows unix supported tier1]}}
 {{htmlmetatags>metatag-keywords=(php, programming, database, mysql, percona, mariadb)}} {{htmlmetatags>metatag-keywords=(php, programming, database, mysql, percona, mariadb)}}
v5/database/mysql.1532657844.txt.gz · Last modified: 2018/07/27 04:17 by mnewnham