Women in Technology

Hear us Roar



Article:
  Apache Web-Serving With Mac OS X, Part 5
Subject:   Can't start server: Bind on TCP/IP port: Address already in use
Date:   2002-06-30 03:25:38
From:   mrx1
OS X Client 10.1.5 with default Apache/PHP installed (and working)
MySQL: mysql-3.23.49.pkg from Marc Liyanage.


First of, I’m a total newbie in this stuff, so please be nice to me! :)
The install seems fairly straight forward and the instructions are clear BUT:


After installing the package, when I try runnig the “sudo ./scripts/mysql_install_db” I get this:


Password:
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
020630 9:50:49 ./bin/mysqld: Shutdown Complete


This ERROR thing at the end doesn’t look too good but I don’t give up! I still follow the instructions and change the owner with “chown” etc...: Then, when I run the “mysql test” I get this:


ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


To try to get a clue on what’s going on, I look at the error log:


[localhost:local/mysql/data] dabest% tail localhost.err


020630 09:59:04 mysqld started
020630 9:59:04 Can't start server: Bind on TCP/IP port: Address already in use
020630 9:59:04 Do you already have another mysqld server running on port: 3306 ?
020630 9:59:04 Aborting


020630 9:59:04 /usr/local/mysql/bin/mysqld: Shutdown Complete


020630 09:59:04 mysqld ended


OK, this error log looks pretty consistant with the ERROR from the install (although the author says lower that it's a message that can be ignored, I just mention it in case). BUT, as I said, I’m just trying to follow the instructions and I have no idea how to fix that or what it means. Looks like I got twice the same thing but that’s the first time I try installing MySQL and I’m not on OSX Server so I don’t think it comes pre-installed... I don’t know how to check what’s using this “TCP/IP port” and even if I did, I wouldn’t know what to do about it...
What to do? Help anyone? Thanks!

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Can't start server: Bind on TCP/IP port: Address already in use
    2002-07-12 09:52:02  sdpalmer [View]

    This has been exactly my problem too and I can't figure out what to do either. Any help would be greatly appreciated, please. Thanks.
    • Can't start server: Bind on TCP/IP port: Address already in use
      2002-07-19 20:28:54  placebo [View]

      out of frustration, i deleted the mysql user account and started a fresh one. this seemed to work for me. i didn't get the error anymore.

      make sure you follow the installation procedure by marc liyanage closely the next time around.

      i also got rid of third party gui apps that i had installed to make the process easier. it didn't.

      so, i'm not sure exactly which action got rid of the error, but it did.
      • Can't start server: Bind on TCP/IP port: Address already in use
        2005-08-30 00:46:45  JSMysql [View]

        You have to do forced shutdown ie go to administrative console and go services utility and stop the mysql services.