How to enable mysql5 library for php?

Home Forums MultiConnect OCG How to enable mysql5 library for php?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2667
    JM K
    Participant

    Hi,

    I am trying to enable mysql5 for php to get access to the various PHP MySQL functions. I have installed libmysqlclient-r16 as well as mysql5-client on the CDP. When I tried to use a php script that used a mysql function it was displaying a blank webpage. I would appreciate any suggestions/advice on this one. Thank you and have a great day.

    Best Regards,

    JM

    #3525
    JM K
    Participant

    I don’t think there is a bitbake recipe for php5-mysql.

    http://packages.ubuntu.com/lucid/php5-mysql

    Any help would be appreciated on this one.

    Best regards,

    JM

    #3526
    JM K
    Participant

    Hi,

    My phpinfo() shows that MySQL support ==> enabled however I get a warning when I view the phpinfo():

    PHP warning: PHP Startup: Cannot dynamically load mysql.so – dynamic modules are not supported in Unknown on line 0.

    I changed the php.ini file in the following way:

    I uncommented the line: extension=mysql.so

    I loaded this new php.ini file however the warning persists also the mysql_connect() function fails to work.

    Any help would be very much appreciated.

    Best Regards,

    JM

    #3527
    JM K
    Participant

    Hi,

    I keep getting this error:

    ERROR 2002 (HY00) : Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’. When I checked there was no file called mysql.sock in the tmp folder. I did an scp of mysql5 located in the openembedded/recipes/mysql to the CDP. I found that there were a few mysql files located in the /usr/bin folder. I copied the mysql file in to the /etc/init.d folder and tried to start the mysql service:

    # /etc/init.d/mysql start

    I get the response:

    ERROR 2002 (HY00) : Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’

    Is there any further installation procedure to be followed for installing mysql? I have gone through different forums. Most of the time they are all related to native linux and so the solutions just don’t fit. I would appreciate any advice/suggestions on this one.

    Best Regards,

    JM

    #3528
    Jesse Gilles
    Blocked

    Did you install packages for a mysql server on the CDP?

    You could also look at using sqlite3, it is much simpler, smaller and there is no server needed and hence no configuration. It has also been tested by Multi-Tech.

    #3529
    JM K
    Participant

    Dear Jesse,

    Thanks a lot for your excellent suggestion/advice. I installed MySQL Server and MySQL Client then as per your advice, changed my mind and decided to install sqlite. I faced no hassles so far like the mysql. Installation wise it was much simpler and I felt sqlite functions in php were much easier than mysql. Thanks again.

    Best Regards,

    JM

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.