Unsupported Screen Size: The viewport size is too small for the theme to render properly.

PHP can't connect to database when SQLyog running

forums forums SQLyog SQLyog: Bugs / Feature Requests PHP can't connect to database when SQLyog running

  • This topic is empty.
Viewing 12 reply threads
  • Author
    Posts
    • #8803
      dekamerone
      Member

      Hi,

      I just experience the following problem:

      On my local Win2000 Workstation I run a Apache Webserver with a lot of virtual hosts and PHP5-Module.

      When I start SQLyog Enterprise and connect to the local Mysql-Server, the connection process of SQLyog works fine – but from this time on, the PHP5-Module of the local Apache Webserver isn't capable to connect to the local Mysql database server anymore.

      After disconnecting the SQLyog-connection to localhost the problem is immediately disappearing … strange.

      Any idea about?

      (it's really very annoying, when you have to open and close SQLyog by the dozen for debugging purposes .. 🙁 )

      Thx4Ur help : Michael

    • #17026
      CalEvans
      Member

      Just a guess but try checking you max_connections in your my.cnf file.

      =C=

    • #17027
      dekamerone
      Member

      Hallo Cal,

      thx4Ur quick reply.

      But “max_connections” is set to 100.

      And if I use mysql commandline utility to connect to database, I can login without any problems.

      If you ask me, I guess a little bit more, that it has something todo the way how the mysql-connection is implemented in actual version of SQLyog – because this problem never happens with last version 3.5. (ok, since then I also upgraded my Apache webserver from PHP4 to PHP5 module – so it's not sure …).

      :-/

      thx4all : Michael

    • #17028
      Ritesh
      Member

      We have just changed the MySQL client library from 3.5 to 4.0. Everything else remains same.

      Do you have a copy of SQLyog v3.5 with you? Just reinstall it and see if the problem persists.

    • #17029
      dekamerone
      Member

      Hi,

      I just checked the described problem over, but can't really compare, if it worked with old version 3.5. See below why.

      Having some other trouble experience now, I can say as follows: the problems always start after opening a mysql server connection via SSH tunnel and do not depend on database syncing itself.

      -> In case I first connect to remote mysql server (using SSH tunnel), I'm not be able to connect to localhost database server, neither with SQLyog nor with Apache webserver (error: access denied for root@localhost ). After disconnecting the remote connection both local connections (Apache and the SQLyog localhost connection) working well parallel.

      -> In case I start with the SQLyog localhost connection, the Apache webserver localhost connection will work immediately until the SSH connection to remote Mysql server is established – from then, the localhost and remote connection within SQLyog will still work, but not the Apache Webserver connection to localhost.

      Any ideas about?

      thx4Ur help : Michael

    • #17030
      Ritesh
      Member

      What happens if you try to connect using the MySQL command line tool?

    • #17031
      dekamerone
      Member

      Hi,

      yes, the behaviour of the mysql commandline tool is similar to the Apache server. I get a “Access denied for root@localhost” error message as well.

      But meanwhile I found the solution for my problem:

      Just use another port than 3306 for SSH tunnel settings (maybe port 3310) and all things work well. It seems, every connection has to use it's own local connection port, so for example you could use for a second SSH tunnel connection port 3312 and so on.

      thx4Ur support and have a nice week-end : Michael

    • #17032
      dekamerone
      Member

      Hm,

      but sorry, there is still one problem left: if I try to use “Database synchronisation” wizard, I still get the error message

      =================

      Error No. 2013.

      Lost connection to MySQL server during query

      =================

      What could happen here? Unfortunately the changed SSH tunnel port settings (like I described in my last post) doesn't work here … 🙁

      thx4all : Michael

    • #17033
      dekamerone
      Member

      Hi,

      just feeling, I should push up my problem thread again … because the main reason I bought the Enterprise edition was the Database Synchronisation wizard 🙁

      No one an idea, how I could avoid spending time over time for manual table copy tasks? 🙁

      Thx4all :huh: Michael

    • #17034
      peterlaursen
      Participant

      Ritesh asked you a question !!

      You will have to try different clients (Command line tool, MySQL Administrator, MySQL Query Browser … ).

      We will have to know if it is ONLY a problem with sqlyog or if it's related to the combination of software versions.

      I can't imagine that sqlyog would behave different than for instance MySQL Administrator.

      It could very well be a problem related the combination og php-version and client library.

    • #17035
      Ritesh
      Member
      dekamerone wrote on Feb 25 2005, 02:03 PM:
      Error No. 2013.

      Lost connection to MySQL server during query

      Does this help:

      http://dev.mysql.com/doc/mysql/en/gone-away.html

    • #17036
      dekamerone
      Member

      Hi Ritesh,

      thx4Ur hint – it motivated me to have some bad times in front of the PC monitor, and produced the following long post. Hope it will help some other people too.

      To give a summary of this thread: we had two different problems:

      1. General connection problems when using SSH tunnel

      2. Usage of function “Database Synchronization Wizard” (when one host is connected with SSH tunnel)

      Quite similar topics, so the solution of problem 1. is the basis for getting on problem 2.


      Description of problem 1.:

      There is a Mysql 3.23.58-nt database server running on my Win2000 Workstation, a second Mysql server v. 3.23.57-log is running on the Linux internet server „iklk.de“.

      After starting SQLyog Enterprise v4.01 I experience the following behaviour:

      -> In case I first connect to remote mysql server (using SSH tunnel), I'm not be able to connect to localhost database server, neither with SQLyog nor with Apache webserver (error: access denied for root@localhost ). After disconnecting the remote connection both local connections (Apache and the SQLyog localhost connection) working well parallel.

      -> In case I start with the SQLyog localhost connection, the Apache webserver localhost connection will work immediately until the SSH connection to remote Mysql server is established – from then, the localhost and remote connection within SQLyog will still work, but not the Apache Webserver connection to localhost.


      Solution of problem 1.:

      Just use another port than 3306 for SSH tunnel settings (maybe port 3310) and all things work well. It seems, every connection has to use it's own local connection port, so for example you could use for a second SSH tunnel connection local port 3312 and so on.


      Proposal to address problem 1. in SQLyog:

      Just include a hint in settings dialog, which SSH-tunnel local port to choose best.


      Description of problem 2.:

      Server environment: see problem 1.

      When using Database synchronization wizard I 'm not able to get the list of databases from SSH-tunnel connected mysql server (using Popup control „Database“ on wizard screen 2):

      -> In case my Norton Antivirus Firewall ist activated I get the error „Error No. 2013. Lost connection to MySQL server during query“.

      -> In case my Norton Antivirus Firewall ist deactivated I get the error „Error No. 1045. Access denied for user '[email protected]' (Using password: YES)“.

      BUT when when I set the target database manually (just write it down in popup text field 'Database:“) and go to screen 3 of the Wizard (using button „Next“), then I experience the following:

      (in that case it makes no difference, if Norton firewall is activated or deactivated)

      -> In case I use the correct passwort setting, I can perform synchronisation as expected.

      -> In case I use wrong password setting, I get the following error message: „Error No. 1045. Access denied for user '[email protected]' (Using password: YES)“ (note the different hostname in error message!)


      Solution of problem 2.:

      Workaround 1: just put in target database name manually. (general workaround)

      Workaround 2: deactivate Norton Firewall, add user „[email protected]“ to remote Mysql server. (workaround specific to my situation and only neccessary if you need to get remote database list)


      Proposal to address problem 2. in SQLyog:

      Harmonize implementation of the „show databases“ function in Synchronisation Wizard with usual coding for connection initializing.


      Conclusion:

      We had 3 problem areas:

      – local port setting of SSH-tunnel connections (general problem for all SSH-tunnel connections)

      – different mysql user forwarding for „SHOW database“ popup in Database synchronisation wizard (only when using SSH-tunnel connection ? – in every case: check )

      – Norton Firewall problems with SHOW database“ popup in Database synchronisation wizard (note: it's always a good try to deactivate your firewall in case of connection errors)

      After about 6 hours of analysing, bringing remote Mysql server in -log mode, getting some help from this forum, I could solve the described problems for me.

      As a second result, there are 2 suggestions for making SQLyog better.

      Please give feedback to me, if there are still some questions about.

      Thx4Ur help : Michael

    • #17037
      Ritesh
      Member

      Thanks for your detailed report.

      I have forwarded it to my development team.

Viewing 12 reply threads
  • You must be logged in to reply to this topic.