Announcement

Collapse
No announcement yet.

Cannot connect to local MySQL database

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot connect to local MySQL database

    Well, I am a totally newbie in ScriptCase world but really hard want to learn to use this wonderful program.

    I am using MPB with Lion 1.8.5. Downloaded ScriptCase 7.1 and installed it twice because the first installation was not successful (used TimeMachine in my MPB and backed in time). The second time the installation was ok, logged in 127.0.0.1:97, changed password, created a new user and so on.

    Have studied your tutorial videos and when I first time try to create a new project everything is going well to New connection.

    In Server/Host (Name or IP) I have tried both 'localhost' and '127.0.0.1'.

    With 'localhost' I get following error when I try to list database:
    Can't connect to local MySQL server through socket '/usr/local/zend/mysql/tmp/mysql.sock' (2) mysql_connect(): Can't connect to local MySQL server through socket '/usr/local/zend/mysql/tmp/mysql.sock' (2)

    With '127.0.0.1' I get following error when I try to list database:
    Connection Error

    Lost connection to MySQL server at 'reading initial communication packet', system error: 61 mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 61

    Have had this problem in two days, used your Web Help, tried to find answers on internet and so on. If somebody, anybody that would have a clue please help me with this problem.

    With greetings from Sweden.

  • #2
    Originally posted by Martti Mustonen View Post
    [...] to use this wonderful program.
    That is still to come ...

    Check if you can connect to the mysql-db when you use phpMyAdmin or Adminer. When yes, what have you set in the connection settings at DBMS type?
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

    Comment


    • #3
      Are you sure MySQL is running? MySQL is not a part of the SC package and needs to be installed separately. Could be that you are using an incompatable MySQL too. Look at the SC specifications. Would like to give some more info, but I'm not running on Mac.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Hi RHS and aducom!

        Thanks for your replies. I know that I am a totally newbie in ScriptCase and it fact not at all working with computers in my ordinary job. Earlier used Windows but during last 3 years using MBP.

        I installed MAMP www.mamp.info in my MPB and in MAMP Apache, phpMyAdmin, MySQL works well but these components/programs are running under MAMP.

        So, I think that my newbie problem can be solved by two different ways:

        1) Need install phpMyAdmin and MySQL 'under' ScriptCase (Apache Web Server 2.2.15). If somebody has information about this process so I gratefully read your ideas, links and so on.

        2) Create a connection between ScriptCase and MAMP but how? Any ideas? Tried to find answers on internet without any success.

        I think that about 99.9% of ScriptCase users are experts/programmers with many years of experience. Unfortunately for a moment I am a part of 0.1% group.

        Hoping to read some answers soon.

        With greeting from Stockholm.

        Comment


        • #5
          I have look at mamp.info ... You probably just need to change the port from 3306 to 8889 in the connection settings.
          Best regards: - Reinhard -

          I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

          Comment


          • #6
            Thanks for your answer but with 8889 port it only generates the following error:

            Connection Error

            Can't connect to local MySQL server through socket '/usr/local/zend/mysql/tmp/mysql.sock' (2)

            mysql_connect(): Can't connect to local MySQL server through socket '/usr/local/zend/mysql/tmp/mysql.sock' (2)

            Also attached two copies of my computer screen so you can check that everything is ok.

            Comment


            • #7
              Here are the screenshots in dropbox.

              https://www.dropbox.com/s/o5p3j2aykz...2014.03.05.png

              https://www.dropbox.com/s/rl1cr4dmdq...2014.03.31.png

              Comment


              • #8
                Hi Reinhard,

                would be lucky to another because no one answers my question in this forum.

                why when I change the connection this change is done at the server level and not only at the browser or session level ?

                if I make the change using the macro sc_change_connection the change is made OK, then I login in another browser window in the same application, the data displayed is the same that the antother instance or session that made the change connection.

                What I'm doing wrong or What I need to do?

                I am using Windows server 2003, zend server, apache and mysql

                Very Very thanks,

                Aquiles

                Comment


                • #9
                  @Martti Mustonen: use ip adress 127.0.0.1, not localhost ...

                  @aquiles: sorry, please make your own thread.
                  Best regards: - Reinhard -

                  I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                  Comment


                  • #10
                    I have tried several times also with 127.0.0.1 but same problem:

                    Connection Error

                    Lost connection to MySQL server at 'reading initial communication packet', system error: 61

                    mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 61

                    Any ideas what to do?

                    Comment


                    • #11
                      Originally posted by Martti Mustonen View Post
                      Any ideas what to do?
                      Yes, next try: check your (MAMP-)firewall that port 8889 is open.
                      Last edited by RHS; 10-12-2013, 06:55 AM.
                      Best regards: - Reinhard -

                      I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                      Comment


                      • #12
                        In Osx10.8.5 with MAMP (www.mamp.info) the MySQL localhost solution is following:

                        Use Terminal (cd command) and go to following directory:

                        Applications/netmake/v7/components/zend/etc/php.ini

                        Use Terminal (sudo nano php.ini) and find mysql.default_socket
                        It is empty and you need to insert: /Applications/MAMP/tmp/mysql/mysql.sock
                        Below you can see the correct lines:

                        ; Default socket name for local MySQL connects. If empty, uses the built-in
                        ; MySQL defaults.
                        ; http://www.php.net/manual/en/mysql.c...default-socket
                        mysql.default_socket = /Applications/MAMP/tmp/mysql/mysql.sock

                        After that save, restart your computer and both MAMP and ScriptCase will work :-)

                        Comment


                        • #13
                          I would never have found that... *G*
                          Albert Drent
                          aducom software netherlands
                          scriptcase partner, reseller, support and (turn-key) development
                          www.scriptcase.eu / www.scriptcase.nl

                          Comment

                          Working...
                          X