We had a problem before, where the PHP page does not load as fast as it should on mySQL database access. We seem to have solved it by allowing the 127.0.0.1 to point to localhost.
What we did was removed the comment sign # to resolve the ip as localhost.
Host file is found at the following directory: c:\windows\system32\drivers\etc\
File name is hosts.
There are a lot of source material on the internet to edit the host file.
This is one of them:
http://helpdeskgeek.com/windows-7/windows-7-hosts-file/
Website Development & Programming related to front-end and back-end. Tech news: on gadgets, technology for the web and other things I think will be of use to people to be on the know.
Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts
Monday, April 14, 2014
Wednesday, December 4, 2013
PHP PDO why the error message given has the computer name, and domain
I have been trying to connect to mySQL server locally and there is an error give with Password:NO.
After searching for a while there is a simple explaination the username and password I have given does not have rights to the database I have specified, hence the error message.
The solution and explination can be found here: http://stackoverflow.com/questions/13002409/why-php-pdo-uses-a-different-from-hostname-to-the-one-used-by-mysql-connect-wh
Hope this helps. Happy coding.
After searching for a while there is a simple explaination the username and password I have given does not have rights to the database I have specified, hence the error message.
The solution and explination can be found here: http://stackoverflow.com/questions/13002409/why-php-pdo-uses-a-different-from-hostname-to-the-one-used-by-mysql-connect-wh
Hope this helps. Happy coding.
Monday, December 2, 2013
500 Internal Server Error Message
At work I have seen one of our site going down/offline and looking at it on the IIS the website is on and looking at the log files, there was no error.
I think this website could be the answer on why it has been down: https://kb.mediatemple.net/questions/1903/Why+am+I+getting+a+500+Internal+Server+Error+message%3F
Which is understandable, since out database is located somewhere else. It could have been timeout that causes our website to show 500 error.
Another thing that could help in determining is the Timeout detection as a sample on this website: http://bytes.com/topic/php/answers/620062-how-handle-php-execution-timeouts-gracefully
What I don't understand is why we cannot connect at times on Remote Desktop, though.
I think this website could be the answer on why it has been down: https://kb.mediatemple.net/questions/1903/Why+am+I+getting+a+500+Internal+Server+Error+message%3F
Which is understandable, since out database is located somewhere else. It could have been timeout that causes our website to show 500 error.
Another thing that could help in determining is the Timeout detection as a sample on this website: http://bytes.com/topic/php/answers/620062-how-handle-php-execution-timeouts-gracefully
What I don't understand is why we cannot connect at times on Remote Desktop, though.
Tuesday, July 16, 2013
MySQL WorkBench problem cannot create user
'Unhandled exception: Error creating account' error message when creating an account in mySQL Workbench.
I'm using workbench 5.2.31 CE.
This problem have popped up, when I'm trying to create a user in mySQL.
There are two steps to work around this:
- edit the sql-mode configuration. It can be found under Advance tab, Edit the text of sql-mode. Remove the part "NO_AUTO_CREATE_USER," or cut it. Then paste it back after you have created your user.
- Run the grant all previleges script as instructed below.
The solution is very simple. You just have to run one of this statement in the Workbench Query window:
GRANT ALL PRIVILEGES ON *.* TO changetousername@localhost;
GRANT ALL PRIVILEGES ON *.* TO 'changetousername'@'%';
This will create an account without password. So better set the password and change the previleges.
I don't know if this is the best work around or the worst. But if you are desperate to add a user account. This is the way that worked for me.
Here is part of the source of the solution:
http://stackoverflow.com/questions/15673640/unhandled-exception-error-creating-account
I don't know if this is the best work around or the worst. But if you are desperate to add a user account. This is the way that worked for me.
Here is part of the source of the solution:
http://stackoverflow.com/questions/15673640/unhandled-exception-error-creating-account
Labels:
Creation,
Database,
Development,
MySQL,
Programming,
solution,
SQL,
User Account
Subscribe to:
Posts (Atom)