Re: Slow connection to Data base
Hi :) Thank you so much for the answers. After a long time serching the internet I found this '--skip-name- resolve' thing and put it on my my.ini file. The most funny was that only the Ubuntu Server was taking all this time to connect the database everytime. I tried installing WAMP on my PC and the connection in it tooks the 4 seconds only at the first time. For the ubuntu it was resolving the name all times. I think there is a problem with resolving names in linux x windows connections or something. Well, living & learning! Problem solved! Thanks for helping me. Have a nice day ;) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Slow connection to Data base
http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_skip-name-resolve On Apr 26, 8:12 pm, Hartmann wrote: > Hello everybody! > > I've installed and configured cake 1.3.8 on an Ubunutu Server 10.10 > all right. > > Before configuring the database, the cake home page was taking 0.15 s > to load and was alerting that it wasn't able to connect to the > database (of course)... > > So, I configured my database.php (in my case is an Windows PC on my > LAN): > > class DATABASE_CONFIG { > > var $default = array( > 'driver' => 'mysql', > 'persistent' => false, > 'host' => '10.1.1.33', > 'login' => 'cook', > 'password' => '#', > 'database' => 'cook', > 'prefix' => '', > ); > > var $test = array( > 'driver' => 'mysql', > 'persistent' => false, > 'host' => '10.1.1.33', > 'login' => 'cook', > 'password' => '#', > 'database' => 'testcook', > 'prefix' => '', > ); > > } > > After configuring this way, the home page is alerting me that cake php > IS ABLE to connect. But it is taking 4 seconds to display any page. > > Is it normal? > > Thank you! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Slow connection to Data base
Well of course a DB on the same server should connect much faster than a DB on an external server. Yet in your case it's on the same LAN so there shouldn't be huge delays with it! The best thing to do is as "circket" suggested. Create a simple PHP- Script page that uses normal DB connection functions and give a try with that one. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Slow connection to Data base
On Tue, Apr 26, 2011 at 9:29 AM, Diogo Hartmann wrote: > Something interesting to add: > When I use a localhost database the page are dispalyed very fast. > Is anything wrong with usign an external database? Ask yourself if there may be something wrong with accessing YOUR external database. The next step might be to create a PHP script (non-Cake) using the same DB. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Slow connection to Data base
Something interesting to add: When I use a localhost database the page are dispalyed very fast. Is anything wrong with usign an external database? Atenciosamente, Diogo Hartmann -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php