The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql error

Discussion in 'Database Discussions' started by mojamoi, Oct 23, 2007.

  1. mojamoi

    mojamoi Well-Known Member

    Joined:
    Jul 23, 2007
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    help pls!!!!!!
    Call to undefined function mysql_connect() in /usr/local/apache2/htdocs/search/dbconnect.php on line 10
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    When compiling Apache/PHP, did you ensure that "MySQL of the System" and/or "MySQL" was selected?

    You can check this when you get to Profile :: Apache :: PHP Main :: PHP Specific :: Basic by clicking Advanced Configuration.
     
  3. mojamoi

    mojamoi Well-Known Member

    Joined:
    Jul 23, 2007
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    help?mysql

    php was compiled like this
    './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-libxml2=/usr/share/doc/libxml2' '--with-pear=/usr/share/doc/php-pear' '--with-curl=/usr/local/' '--with-mysql-dir=/usr/local/mysql' '--with-zlib-dir=/usr/lib' '--with-zlib-dir=/usr/lib64' '--with-openssl' '--with-ffmpeg=/usr'

    apache was compiled liek
    ./configure --pefix=/usr/local/apach2 --enable-so

    shud i also add the path to mysql for apache compilation?
     
  4. n1ck

    n1ck Member

    Joined:
    Oct 3, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1

    You need to compile php with '--with-mysql'.

    For example,

    './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-libxml2=/usr/share/doc/libxml2' '--with-pear=/usr/share/doc/php-pear' '--with-curl=/usr/local/' '--with-mysql' '--with-mysql-dir=/usr/local/mysql' '--with-zlib-dir=/usr/lib' '--with-zlib-dir=/usr/lib64' '--with-openssl' '--with-ffmpeg=/usr'


    Regards.
     
    #4 n1ck, Oct 24, 2007
    Last edited: Oct 24, 2007
  5. mojamoi

    mojamoi Well-Known Member

    Joined:
    Jul 23, 2007
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    thanks it works

    do u know a way to link the databases in phpmyadmin toi the mysql cluster....
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you use WHM -> SQL Services -> Setup Remote MySQL server, you can set up a cPanel/WHM to work with a remote MySQL server and phpMyAdmin will reference that remote server instead.
     
  7. mojamoi

    mojamoi Well-Known Member

    Joined:
    Jul 23, 2007
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    this serevr doesnt use coamel /whm its just opure debian

    mysql> show engines;
    +------------+---------+----------------------------------------------------------------+
    | Engine | Support | Comment |
    +------------+---------+----------------------------------------------------------------+
    | MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance |
    | MEMORY | YES | Hash based, stored in memory, useful for temporary tables |
    | InnoDB | YES | Supports transactions, row-level locking, and foreign keys |
    | BerkeleyDB | NO | Supports transactions and page-level locking |
    | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) |
    | EXAMPLE | YES | Example storage engine |
    | ARCHIVE | YES | Archive storage engine |
    | CSV | YES | CSV storage engine |
    | ndbcluster | YES | Clustered, fault-tolerant, memory-based tables |
    | FEDERATED | YES | Federated MySQL storage engine |
    | MRG_MYISAM | YES | Collection of identical MyISAM tables |
    | ISAM | NO | Obsolete storage engine |
    +------------+---------+----------------------------------------------------------------+
     
Loading...

Share This Page