View Full Version : Mysql still shitting me
Pirate
08-08-2005, 12:41 PM
Well my IT guys have played with the server, upgraded stuff but fuck all has happened.
Heres the situation:
One mysql server that runs two databases, one is a vbulletin one which works perfectly. And the other is the a payments database.
The problem lies with the payments DB, I can create it, edit it and I can add data to it via phpmyadmin. But I just can't get it to accept data from a webpage.
I though it was a problem with the code, but I uploaded the same form to the zgeek server (http://www.zgeek.com/test/deft_payments_view.php) and it works.
I though it was my permissions but I have ALL PRIVILAGES on my account yet it still won't work. So does anyone have any suggestions for troubleshooting this? Its been 3 days now and Its been holding my work up. The IT guys also don't know anything about mysql so I'm doubly fucked.
stinky
08-08-2005, 12:53 PM
permissions are kept in the mysql database ( tables: user,host,db,tables_priv,Columns_priv,func), make sure your user has appropriate access in the user table as well as db. Definately check in the db table to see if your user has access to both Db's.
If the localhost root user is enabled in mysql ( usually with a blank password by default ) and the php pages are on the same server then try setting the user/pass to root and see if that works.
Chocoholic
08-08-2005, 01:08 PM
:swear: Oopsie, looks like I didn't read The Posting Guidelines (http://forums.zgeek.com/showthread.php?s=&threadid=16703) so I got edited. :swear:
Pirate
08-08-2005, 01:10 PM
is their a query i can run to set all the permissions without running phpmyadmin?
Haggisboy
08-08-2005, 01:43 PM
:swear: Oopsie, looks like I didn't read The Posting Guidelines (http://forums.zgeek.com/showthread.php?s=&threadid=16703) so I got edited. :swear:
beagle
08-08-2005, 10:46 PM
If it works on one server and not another I find it's usually one of two things:
- permissions on the user for mysql not right, or,
- mysql connect statement not right (or server name/IP wrong).
PM me if I can be of assistance
beagle :-)
druid
09-08-2005, 01:19 AM
I though it was a problem with the code, but I uploaded the same form to the zgeek server (http://www.zgeek.com/test/deft_payments_view.php) and it works.
Is the code on zgeek using the db at work or did you copy the db over too? Sounds like something might be wrong with PHP (is your code run from the same web server as phpMyAdmin etc?).
stinky
09-08-2005, 04:01 PM
is their a query i can run to set all the permissions without running phpmyadmin?
if you have shell access to the box the following will get you to a mysql client prompt.
# mysql -u <user> -p mysql
check the mysql documentation for the "GRANT" command. Although I don't use it as I find it easier to edit the tables themselves.
Also check the mysql website for windows mysql clients like mysql-front, or mysql control centre they may be of some help, but first you need a user will good permissions that can access the database properly from outside of localhost.
stinky
09-08-2005, 04:03 PM
You could always try webmin, I think it has a fairly easy to use management interface for mysql which covers stuff like permissions. I'm not a big fan of webmin overall though.
What error message do you get and what are you trying to do exactly? (insert, update)
Can you execute the exact same statement command line?
Is the webpage configured to access the database as you? (if so probably not the best idea, ideally you should have a more generic user configured with a tighter set of permissions or bad things can happen)
More than likely either a permissions problem or a misconfiguration in the webpage's access to the database. How are you doing this via the webpage?
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.