Page 1 of 1

Call to undefined function: mysql_create_db()

Posted: Tue Mar 16, 2004 5:21 am
by allelopath
noobie question.

on the line of code:
if (mysql_create_db('newDb'))
I'm getting the error:
Call to undefined function: mysql_create_db()

the mysql db is installed and running
(I can access it with mysqlnavigator)

phpinfo() says:
Configure Command './configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local/mysql'

I installed mysql by using 2 rpms (client and server). So that puts the mysql stuff in /var/lib/mysql, i think:

# pwd
/var/lib/mysql/mysql
# ls
columns_priv.frm columns_priv.MYI db.MYD func.frm func.MYI host.MYD tables_priv.frm tables_priv.MYI user.MYD
columns_priv.MYD db.frm db.MYI func.MYD host.frm host.MYI tables_priv.MYD user.frm user.MYI

whereas there is not much in /usr/local/mysql:

#cd /usr/local/mysql
# ls -a
. .esd_auth .gconf .gnome .gnome2_private .gtkrc-1.2-gnome2 .metacity .recently-used .xsession-errors
.. .fonts.cache-1 .gconfd .gnome2 .gnome-desktop .ICEauthority .nautilus .rhn-applet.conf

So, is the problem that php is looking in /usr/local/mysql but the stuff is in /var/lib/mysql?
If so, how to i point it to /var/lib/mysql?
If not, what is the problem?

Posted: Tue Mar 16, 2004 9:09 pm
by Pyrite
The function mysql_create_db() is deprecated.