#790 (ok 3.4) autodetect mysql extension to use

Needs_decision
fixed
1
2013-06-11
2005-10-04
No

set default $cfg['Servers'][$i]['extension'] to ''
and try to autodetect available mysql extension

use $cfg['Servers'][$i]['extension'] to force extension
to use.

Discussion

  • Michal Čihař

    Michal Čihař - 2005-10-04

    Logged In: YES
    user_id=192186

    It's hard to detect to which MySQL version you are
    connecting, mysqli needs MySQL 4.1.

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580

    if ( try(mysql) )
    use mysql
    get mysql version
    if version >= 4.1
    if ( try(mysqli) )
    use mysqli
    elseif ( try(mysqli) )
    use mysqli
    else
    throw error

     
  • Michal Čihař

    Michal Čihař - 2005-10-04

    Logged In: YES
    user_id=192186

    It's more complicated as you also need to handle
    authentication. Also mysql extension can not authenticate to
    4.1 server if old passwords are not enabled on server.

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580

    with socket/telnet you get: something like:

    *
    4.0.24-nt☺t5HL$lw1☻

    allowing you to detect version without mysql(i)_connect()
    ... but didnt find any documantation on this welcome string
    in the MySQL manual ...

     
  • Michal Čihař

    Michal Čihař - 2011-03-02

    The default is now mysqli, I don't think autodetection makes sense these days.

     
  • Michal Čihař

    Michal Čihař - 2011-03-02
    • priority: 5 --> 1
    • assigned_to: nobody --> nijel
    • summary: autodetect mysql extension to use --> (ok 3.4) autodetect mysql extension to use
    • status: open --> open-fixed
     
  • Michal Čihař

    Michal Čihař - 2011-05-11
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks