View Full Version : MySQL Error
Ug
2004-05-05, 06:52 AM CDT
I'm trying to run a server at school for some booking system we have for the computer rooms here. But we've hit a problem when we're trying to run the install script. we've got a fairly vanilla server running with httpd and mysql. its got a webmin server, but when we try to execute the script either locally or remotely we get the following error:Fatal Error: Call to undefined function : mysql_connect() in /var/www/html/booking/setup/setup.php on line 16 Any ideas?
Picomp314
2004-05-05, 07:07 AM CDT
I had Similar errors when I tried to Install MySQL for a forum, My suggestion is to try out PostgreSQL if possible...
flea
2004-05-05, 07:21 AM CDT
for some reason mysql didn't get compiled into php, try using odbc_*
Ug
2004-05-05, 07:36 AM CDT
Please explain... ;)
ewdi
2004-05-05, 08:34 AM CDT
grab this RPM
php-mysql-4.3.4-1.1.i386.rpm
and install it
ftp://rpmfind.rediris.es/sites2/fedora.us/fedora/fedora/1/i386/RPMS.updates/php-mysql-4.3.4-1.1.i386.rpm
It's liblaries that allow you to connect to mysql using php
flea
2004-05-05, 09:07 AM CDT
yea what tux said, seems that when you installed php the mysql functions didnt get compiled in with it, ie to let you use mysql_connect, mysql_query etc
so that package he referred to will have the mysql functions built in so you could do just that:)
Ug
2004-05-05, 10:10 AM CDT
Thanks, will try it tommorrow. ;)
Ug
2004-05-06, 06:49 AM CDT
Well we've now got the database setup with the php script after installing that RPM.
The problem we now have is that we get the following error when we try to access the page we want "Woops, the database can't be contacted".
Any ideas?
ewdi
2004-05-06, 07:45 AM CDT
make sure login into database is correct.
Ug
2004-05-06, 09:51 AM CDT
We're pretty unsure as to what the login as such is other than "booking" as the username. We've no idea how we'd define the username...
ewdi
2004-05-06, 09:53 AM CDT
okay, first you need to create the database, grant access to the database using grant command in mysql and also privileges for it.
flea
2004-05-06, 03:02 PM CDT
or you could always go unsecure and not have a pwd set, in that case 'root' would be the username
Ug
2004-05-06, 03:06 PM CDT
We've tried root, no such luck.
rbirdman
2004-05-06, 05:23 PM CDT
With PostgreSQL you would create a user with "createuser -P username' giving your user a password.
Then you would grant permissions on the table to that user with "grant all on tablename to username".
Then you would connect via php with those detail. I assume its very similar in mySQL. Also one of the PostgreSQl conf files needs to be edited to allow local users to connect.
jeru
2004-05-07, 02:20 AM CDT
Just make a new account with the right permissions....
This'll make it easy.
http://www.mysql.com/products/mysqlcc/
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.