SV: MySQL - PHP Problem

Douglas Clinton declinton at sympatico.ca
Wed Dec 3 22:03:23 UTC 2003


On Wed, 03 Dec 2003 17:45:06 +0100
"stg Ideeel Internet (Joris)" <joris at ideeel.nl> wrote:

make sure the following lines are in your /etc/php.ini file
extension=mysql.so
extension_dir = /usr/lib/php4/

Good Luck

> At 11:26 03/12/2003 -0500, Paul_Lin wrote:
> >Paolo Nesti Poggi wrote:
> >
> >>>Hi all,
> >>>I ran a php/mysql script and got 'unkown function mysql_connect()' ->
> >>>thinking I knew why I did 'yum install php-mysql' and it installed that
> >>>rpm.
> >>>
> >>>Now when I go to restart mysqld it FAILS! - A 'Timeout' error...
> >>>
> >>>Anyone know what I should do please?
> 
> did you change the root password for MySQLd?
> 
> 
> >>>Many thanks...
> >>>-- Nick W
> >>>
> >>
> >>it might help to see the output of:
> >>#rpm -qa | grep php
> >>and
> >>#rpm -qa | grep MySQL
> >>
> >>/paolo
> >>
> >>
> >>
> >>--
> >>fedora-list mailing list
> >>fedora-list at redhat.com
> >>To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> >>
> >>
> >>
> >>
> >I had the same problem.  The mysqld script is bad in /etc/rc.d/init.d  I 
> >googled around and found this replacement that worked fine (I forgot where 
> >I found it or I would have jsut posted the link).  Save the following as 
> >mysqld and replace the one in init.d:
> >
> >#!/bin/bash
> >#
> ># mysqld    This shell script takes care of starting and stopping
> >#        the MySQL subsystem (mysqld).
> >#
> ># chkconfig: - 78 12
> ># description:    MySQL database server.
> ># processname: mysqld
> ># config: /etc/my.cnf
> ># pidfile: /var/run/mysqld/mysqld.pid
> >
> ># Source function library.
> >. /etc/rc.d/init.d/functions
> >
> ># Source networking configuration.
> >. /etc/sysconfig/network
> >
> >
> >prog="MySQL"
> >
> >datadir="/var/lib/mysql"
> >
> >start(){
> >    touch /var/log/mysqld.log
> >    chown mysql.mysql /var/log/mysqld.log
> >    chmod 0640 /var/log/mysqld.log
> >    if [ ! -d $datadir/mysql ] ; then
> >        action $"Initializing MySQL database: " /usr/bin/mysql_install_db
> >        ret=$?
> >        chown -R mysql.mysql $datadir
> >        if [ $ret -ne 0 ] ; then
> >            return $ret
> >        fi
> >    fi
> >    chown -R mysql.mysql $datadir
> >    chmod 0755 $datadir
> >    /usr/bin/safe_mysqld  --defaults-file=/etc/my.cnf >/dev/null 2>&1 &
> >    ret=$?
> >        # Spin for a maximum of ten seconds waiting for the server to come up
> >    if [ $ret -eq 0 ]; then
> >            for x in 1 2 3 4 5 6 7 8 9 10; do
> >            if [ -n "`/usr/bin/mysqladmin -u mysqld ping 2> /dev/null`" ]; 
> > then
> >                    break;
> >            else
> >                    sleep 1;
> >            fi
> >            done
> >            if !([ -n "`/usr/bin/mysqladmin -u mysqld ping 2> /dev/null`" 
> > ]); then
> >                    echo "Timeout error occurred trying to start MySQL 
> > Daemon."
> >                    action $"Starting $prog: " /bin/false
> >            else
> >                    action $"Starting $prog: " /bin/true
> >            fi
> >    else
> >            action $"Starting $prog: " /bin/false
> >    fi
> >    [ $ret -eq 0 ] && touch /var/lock/subsys/mysqld
> >    return $ret
> >}
> >
> >stop(){
> >        /bin/kill `cat /var/run/mysqld/mysqld.pid  2> /dev/null ` > 
> > /dev/null 2>&1
> >    ret=$?
> >    if [ $ret -eq 0 ]; then
> >        action $"Stopping $prog: " /bin/true
> >    else
> >            action $"Stopping $prog: " /bin/false
> >    fi
> >    [ $ret -eq 0 ] && rm -f /var/lock/subsys/mysqld
> >    [ $ret -eq 0 ] && rm -f $datadir/mysql.sock
> >    return $ret
> >}
> >restart(){
> >    stop
> >    start
> >}
> >
> >condrestart(){
> >    [ -e /var/lock/subsys/mysqld ] && restart || :
> >}
> >
> ># See how we were called.
> >case "$1" in
> >  start)
> >    start
> >    ;;
> >  stop)
> >    stop
> >    ;;
> >  status)
> >    status mysqld
> >    ;;
> >  restart)
> >    restart
> >    ;;
> >  condrestart)
> >    condrestart
> >    ;;
> >  *)
> >    echo $"Usage: $0 {start|stop|status|condrestart|restart}"
> >    exit 1
> >esac
> >
> >exit $?
> >
> >
> >--
> >fedora-list mailing list
> >fedora-list at redhat.com
> >To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> 
> 
> *-------------------------------------
> Joris Benschop
> Stichting Ideeel Internet
> 
> Oude Gracht 42
> 3511 AR Utrecht
> girorek. 9270464
> http://www.ideeel.nl
> info at ideeel.nl
> 
> 
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list


-- 
Douglas Clinton
declinton at sympatico.ca
www.dblsys.ca





More information about the users mailing list