Ok, I've got a really stupid problem here, and I am beginning to obtain really upset.
Only a couple of minutes ago, I possibly could run this site on localhost without any problems. It's running in apache2 on a single machine as mySQL (an Ubuntu box).
I transformed PHP's timezone and file upload size limit, then restarted both apache and mysql.
Now after i attempt to run the website from apache around the server, it may no more choose the database. So far as I will tell, it does not have trouble really hooking up to mysql, however when I run mysql_selectdb, it does not work.
Basically run this website from the laptop, hooking up into it via home network, it really works perfectly.
I am really really frustrated at this time since it was working all right minutes ago. I do not remember even altering any mySQL configurations.
Can someone help me work out how this happened, and just how to repair it? I really should understand this working as quickly as possible.
EDIT: Here's the code I am using for connecting:
mysql_connect($serverUrl,'xx','xxx'); @mysql_selectdb('mydatabase') or die(mysql_error());
EDIT 2: After I make use of the root user login, it really works all right. To the very best of my understanding, I've given root accessibility user I had been using before, however i guess I possibly could be wrong. This is actually the command I had been using in mySQL to provide access:
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';
the consumer i am using is certainly not 'www-data'.
My prediction is you are using among the
mysql_* functions before you establish the bond. That can make the mySQL library use default login data - which, inside your situation, fail.
Browse the file title and line quantity of your error message to determine where it will get triggered.