SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Stockholm
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Problem with MacOSX and /tmp/mysql.sock

    http://www.sitepoint.com/forums/newt...ad.php?f=182#I had some problems with MySQL, so I decided to deinstall MySQL and get a new version on my Mac.

    After I deleded all ol MySQL files by using

    curl -O http://www.entropy.ch/software/macos...e-old-mysql.sh
    remove-old-mysql.sh

    and killing some other entries like ./private/tmp/mysql.sock I reinstalled a new version like:

    using this Side http://www.phaget4.org/Nomad/binaryinstall.html

    ./configure --prefix=/usr/local/mysql
    make
    make install

    so far so good. Now my Problems

    I can't make

    /usr/sbin/groupadd mysqlgrp
    /usr/sbin/useradd -g mysqlgrp mysqlusr

    also there was no way to make:
    chown -R mysqlusr.mysqlgrp var
    chmod -R go-rwx var

    So made the next step:

    maggi# mysqld_safe --usr=root &
    [1] 5681
    [v906-b157:local/mysql/bin] maggi# Starting mysqld daemon with databases from /usr/var
    040720 16:18:32 *mysqld ended

    16:24:39

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

    There is also no hostname.err file where i can look

    Please help,

    M.[FONT=Courier New]

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, I ran into some similar problems with my installation. What I found is that Marc Liyanage's (at entropy.ch) install is pretty good. He's been qualified by MySQLAB as the man to go see.... I remember at one point he was going to quit offering it because AB was going support development of the mac binary... don't know what happened with that, but at any rate,
    When I upgraded from a different installer (which came from a different person) I had to clean it out and go through his instructions a couple times to get it right, but it runs really well now.

    hope that helps.

  3. #3
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Stockholm
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    I've this problem scince i want to install DBD and DBI for Perl. Before MySQL runs pretty good and I used the http://www.entropy.ch/software/macos...stallprocedure side and to remove mySQL I used http://www.entropy.ch/software/MacOS...old-mysql.html. All of Marcs Sides are running pretty good, but my problem is the mysql.sock file.

    I tried out touch /tmp/mysql.sock but the only thing what changed is the message it has changed no from:

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

    to

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

    and the funny thing is, on my Mac is no mysql. I removed all directories and files to get a mysqlclean-system. But mysql still works ???

    I think there must be some other MySQL version running but

    ps xa | grep mysql showed me nothing...

    Question is what can I do now???

  4. #4
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Stockholm
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have reinstalled now MySQL via fink install mysql

    /usr/bin/sudo /sw/bin/fink install mysql
    Reading package info...
    Updating package index... done.
    Information about 1725 packages read in 4 seconds.
    The following package will be installed or updated:
    mysql
    The following 2 additional packages will be installed:
    mysql-client mysql12-shlibs
    Do you want to continue? [Y/n] Y
    dpkg -i /sw/fink/dists/stable/main/binary-darwin-powerpc/database/mysql_4.0.17-11_darwin-powerpc.deb /sw/fink/dists/stable/main/binary-darwin-powerpc/database/mysql12-shlibs_4.0.17-11_darwin-powerpc.deb /sw/fink/dists/stable/main/binary-darwin-powerpc/database/mysql-client_4.0.17-11_darwin-powerpc.deb
    W?hle vormals abgew?hltes Paket mysql.
    (Lese Datenbank ... 19355 Dateien und Verzeichnisse sind derzeit installiert.)
    Entpacke mysql (aus .../mysql_4.0.17-11_darwin-powerpc.deb) ...
    W?hle vormals abgew?hltes Paket mysql12-shlibs.
    Entpacke mysql12-shlibs (aus .../mysql12-shlibs_4.0.17-11_darwin-powerpc.deb) ...
    W?hle vormals abgew?hltes Paket mysql-client.
    Entpacke mysql-client (aus .../mysql-client_4.0.17-11_darwin-powerpc.deb) ...
    Richte mysql12-shlibs ein (4.0.17-11) ...
    Richte mysql-client ein (4.0.17-11) ...
    Richte mysql ein (4.0.17-11) ...
    Installing all prepared tables
    040720 21:10:26 /sw/sbin/mysqld: Shutdown Complete


    To start mysqld at boot time you have to copy support-files/mysql.server
    to the right place for your system

    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    This is done with:
    /sw/bin/mysqladmin -u root password 'new-password'
    /sw/bin/mysqladmin -u root -h v906-b157.hu.liu.se password 'new-password'
    See the manual for more instructions.

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

    You can start the MySQL daemon with:
    cd /sw ; /sw/bin/mysqld_safe &

    You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
    cd sql-bench ; perl run-all-tests

    Please report any problems with the /sw/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

    * mysql: (mysql). MySQL documentation.
    install-info(/sw/share/info/mysql.info): no section specified for new entry, placing at end

    when I n try to make maggi$ sudo /sw/bin/mysqld_safe &

    I get this message:

    Starting mysqld daemon with databases from /sw/var/mysql
    040720 21:12:58 mysqld ended

    There is something eles running? But how to get out what it is?

  5. #5
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Stockholm
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    It's finally running now

    If you have the same Problem, all you have to know is:

    That the mysql.sock is not really a file, it is a Unix domain socket. The program that uses it must create it. If the directory that mysqld wants to keep the file in exists, and has permissions that allow the user running mysqld
    to write to the directory, the socket will be recreated.

    The standard place for the socket is /tmp but that can be changed by compile options and /etc/my.cnf settings so you may have to look to find out where the socket belongs. I just scrolled down to the log file and it is /tmp that you need. (Thx! Dan for this hint)

    Then you have to make something like this:

    mysqladmin [-h ... -u ... -p...] shutdown
    mysqld_safe --user=mysql &

    that should restore your socket file... (Thx Miguel for this hint)

    If you got now this failure by running mysqld_safe &:

    ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

    Checkout that your Server (Maybe Samba, Apache etc...) is still running

    Run the Server, run mysqld_safe & and you will succed!

    best.

    Markus

  6. #6
    SitePoint Member
    Join Date
    Sep 2004
    Location
    Caracas
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I don't know hoow to do that

    Hi, excuse me but i don't speak english and is very hard to me explain the problem.
    I have the same problem with the socket. If i understood you, have to change the place for the socket by compile option, but i don't know how to do that, because i'm freshman using the terminal. Can you help me please?

    I hope that you understand me...
    Thank's

  7. #7
    SitePoint Member
    Join Date
    Sep 2004
    Location
    Malaysia
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dear maggi
    i still can not find mysql.sock.i knew it is a Unix domain socket, the problem is how to recreate this file.
    ^_^
    Thanks

  8. #8
    SitePoint Zealot
    Join Date
    Oct 2009
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Maggi View Post
    That the mysql.sock is not really a file, it is a Unix domain socket. The program that uses it must create it. If the directory that mysqld wants to keep the file in exists, and has permissions that allow the user running mysqld
    to write to the directory, the socket will be recreated.
    I have a newbie question about permissions. when I installed mysql I gave it its own user and group. They were given some this 777 access. Then I set mysql permissions for its own directory.

    If I must set mysql's permissions in its own folder, why would mysql look outside its folder to /tmp which is owned by root? OR, Shouldn't mysql have a folder in /tmp with permissions set to mysql?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •