Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32530 - mysqld can't start: no socket
Summary: mysqld can't start: no socket
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-02 04:26 UTC by crusaderky
Modified: 2003-11-10 23:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description crusaderky 2003-11-02 04:26:36 UTC
I'm using mysql-4.0.14-r2.

If I type "mysqld" (as normal user), I get the following error:

031102 13:23:19  Can't start server : Bind on unix socket: Permission denied
031102 13:23:19  Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
031102 13:23:19  Aborting

while if i run it as root, sometimes I get the same error, sometimes it just exits quietly (without leaving any process running).

The directory /var/run/mysqld is actually empty.

If I run /etc/init.d mysql start, it says "OK" but no server is actually running, and if I try to stop the service it gives a "!!" and fails.

I've already tried re-merging mysql.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-02 11:00:30 UTC
have you done the ebuild config command?
look at the instructions I'm busy writing
http://www.orbis-terrarum.net/~robbat2/guidexml/mailsolution.html

(see the MySQL section).
Comment 2 crusaderky 2003-11-02 11:49:17 UTC
doesn't work.

# ebuild /var/db/pkg/dev-db/mysql-4.0.14-r2/mysql-4.0.
14-r2.ebuild config
 * Hmm, it appears as though you already have the mysql
 * database in place.  If you are having problems trying
 * to start mysqld, perhaps you need to manually run
 * /usr/bin/mysql_install_db and/or check your config
 * file(s) and/or database(s) and/or logfile(s).


# /usr/bin/mysql_install_db
Installing all prepared tables

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/etc/init.d/mysql start (you have to start the server first!)
/usr/bin/mysqladmin -u root -h crusaderbox password 'new-password'
/usr/bin/mysqladmin -u root password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

root@crusaderbox crusader # /etc/init.d/mysql start
 * WARNING:  "mysql" has already been started.
root@crusaderbox crusader # /etc/init.d/mysql restart
 * Stopping mysqld...                                                   
 [ !! ]

root@crusaderbox crusader # mysqld
root@crusaderbox crusader # /etc/init.d/mysql restart
 * Stopping mysqld...                                                   
 [ !! ]

root@crusaderbox crusader # mysqld
root@crusaderbox crusader # mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/
                                    mysqld.sock' (2)
root@crusaderbox crusader # ps -e | grep mysqld
root@crusaderbox crusader # ls /var/run/mysqld/
root@crusaderbox crusader #
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-02 16:46:22 UTC
whoa. stop.

do NOT use /usr/bin/mysql_install_db yourself!

in your details below, you run 'mysqld' but you NEVER check that it started
properly, and if you examined the logs or even the return code, you will
see that it didn't

ok, so for now lets assume you have no data you need in the mysql databases
at all (because you can't even start it).

/etc/init.d/mysql stop
/etc/init.d/mysql zap
rm -rf /var/lib/mysql/

(now follow the instructions on the webpage again)
ebuild /var/db/pkg/dev-db/mysql-4.0.14-r2/mysql-4.0.14-r2.ebuild config
/etc/init.d/mysql start 
(change password etc.)

then it's done.
Comment 4 Jeff Jeter 2003-11-10 17:22:02 UTC
I get the same problems.  I did what was suggested and it still does not
work.  Nothing is in the logs.  I suggest the bug be reopened.  
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-11-10 23:41:04 UTC
jeff: open a new bug and attach the mysqld log files.