Page 1 of 2

sql error

PostPosted: 12. May 2012 05:28
by erzon
Im having this problem

localhost:3306. Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

how can I fix this? Sometimes this error occur then disappear and will appear again I don't know how to solved this

Re: sql error

PostPosted: 12. May 2012 14:25
by erzon
please i need help any can help me to correct this problem

Re: sql error

PostPosted: 12. May 2012 16:13
by hackattack142
You are going to need to provide more context. How are you trying to connect (browser, connector, standalone app)?

If you are trying to do connect directly in the browser like http://localhost:3306, that will not work. You can directly use the database with phpMyAdmin from here http://localhost/phpmyadmin assuming Apache and MySQL are both running. You can use the databases though the MySQL connectors/drivers in PHP or other programming languages directly using the relevant API. You could also use the MySQL console/GUI applications to work with the databases.

Re: sql error

PostPosted: 13. May 2012 23:52
by erzon
im using the localhost connection... I don't have any problem in phpmyadmin.. my problem is in my application.. sometime this error occur but sometimes its ok that is the weird thing.. because I dont know what is the reason why this error is triggered

Re: sql error

PostPosted: 15. May 2012 04:13
by erzon
is there anyone here can help me to fix this problem..

Re: sql error

PostPosted: 15. May 2012 05:05
by hackattack142
Is this a PHP page or another application? If you are running certain queries that take a long time, it is possible your connection is timing out on those longer queries.

Re: sql error

PostPosted: 17. May 2012 04:41
by erzon
its not timing out.. its saying the connection to SQL is having a problem...

Re: sql error

PostPosted: 17. May 2012 23:24
by erzon
any help here? or moderator? I still experience this kind of problem.. and I dont know how to resolved this...

Re: sql error

PostPosted: 17. May 2012 23:37
by erzon
i check logs and this is what I got


120511 22:08:25 InnoDB: 1.1.4 started; log sequence number 56360020
120511 22:08:26 [Note] Event Scheduler: Loaded 0 events
120511 22:08:26 [Note] mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.8' socket: '' port: 3306 MySQL Community Server (GPL)
120511 22:11:31 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
120511 22:11:31 InnoDB: Initializing buffer pool, size = 16.0M
120511 22:11:31 InnoDB: Completed initialization of buffer pool
120511 22:11:31 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
120511 22:11:31 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
120511 22:11:45 InnoDB: 1.1.4 started; log sequence number 56360509
120511 22:11:45 [Note] Event Scheduler: Loaded 0 events
120511 22:11:45 [Note] mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.8' socket: '' port: 3306 MySQL Community Server (GPL)
120517 20:36:44 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3

Re: sql error

PostPosted: 18. May 2012 14:34
by hackattack142
Does it help if you substitute '127.0.0.1' for 'localhost' in your code?

Re: sql error

PostPosted: 19. May 2012 11:40
by erzon
i already add the 127.0.0.1 as localhost still the same problem...

I don't know if my LAN is having a problem or the sql itself I really don't know

Re: sql error

PostPosted: 24. May 2012 07:27
by erzon
is there anyone here with kind heart that can help me with my problem

Re: sql error

PostPosted: 24. May 2012 15:25
by JonB
Can you connect to the database via phpMyAdmin or MySQL Workbench?

IF you can connect via phpMyAdmin - the problem is in the code or the application. Despite all the encouragement, you have not yet told anyone WHAT it is you are doing...

"connecting" is not "doing something" - it is requesting a connection, that happens within a context of some action taken by some code, application or script.

We can't help you if you can't describe the problem.

Re: sql error

PostPosted: 25. May 2012 02:43
by erzon
Yes I can connect in phpMyAdmin...

I made a project in our office where in all our department is encoding their productivity within the php application and it will save in the database... I don't have any problem so far for almost 5 months running the application with xampp but all of the sudden this past few days that 3306 problem in SQL appear, and I didn't made any changes in config or any config at all in my xampp so I'm wondering what is the main cause of this problem... that 3306 connection problem sometimes appear in my application sometimes not.. let says in 1 day that error will appear more than 10 times

Re: sql error

PostPosted: 25. May 2012 17:35
by JonB
Look in your error logs and see if Apache is crashing.

8)