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.

That is still to come … :cool:

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?

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.

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.

I have look at mamp.info … You probably just need to change the port from 3306 to 8889 in the connection settings.

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.

Here are the screenshots in dropbox.

https://www.dropbox.com/s/o5p3j2aykzjf1u3/Screenshot%202013-10-11%2014.03.05.png

https://www.dropbox.com/s/rl1cr4dmdqfozxl/Screenshot%202013-10-11%2014.03.31.png

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

@Martti Mustonen: use ip adress 127.0.0.1, not localhost …

@aquiles: sorry, please make your own thread.

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?

Yes, next try: check your (MAMP-)firewall that port 8889 is open.

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.configuration.php#ini.mysql.default-socket
mysql.default_socket = /Applications/MAMP/tmp/mysql/mysql.sock

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

I would never have found that… G