Call to undefined function: mysql_create_db()

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
allelopath
Forum Commoner
Posts: 34
Joined: Tue Mar 16, 2004 5:21 am

Call to undefined function: mysql_create_db()

Post 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?
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

The function mysql_create_db() is deprecated.
Post Reply