iLTC Home
Bookmark iLTC!

Categories

Perl
  • Perl Tutorials Beginners

  • Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

  • HTML
  • HTML Tutorials

  • Command Line
  • Command Line Tutorials

  • How Tos
  • Other Tips and Tricks



  • <script type='text/javascript'>
    1724607

    iLoveTheCode.com

    MySQL Wordpress Errors - Can't start server : Bind on unix socket Permission denied

    I recently upgraded an older, pre x86, iMac to 10.4.

    Since iLoveTheCode runs on my own home-brewed blog software (and now it's on a new machine), I didn't notice that it broke some old Wordpress/MySQL sites.

    After hours of googling and permissions tweaking, here's what I came up with...

    Errors in the terminal and log files:

    -Can't connect to local MySQL server through socket '/tmp/mysql.sock'
    -STOPPING server from pid file
    -Can't start server : Bind on unix socket: Permission denied

    Observations:

    1) There was no /tmp/mysql.sock, so all the solutions creating a symbolic link were useless.
    2) The pid file was no where to look for answers.
    3) Permission wasn't exactly denied, since no file actually existed.

    Things I tried:

    -first I checked to see if mysql was running:
    ps aux | grep mysql

    -then I attempted to shutdown mysql (which gave me trouble at different stages):
    ./mysqladmin shutdown

    -then I attempted to start mysql (which gave me most of the errors):
    ./mysqld_safe &

    -restarted the server machine.

    -I'll skip the details about how I did chmod and chown on nearly every file and directory and created symbolics links everywhere.

    The fix:

    -renamed the /tmp directory (since it contained files I was afraid to delete it)
    -ran ./mysqld_safe &
    -connected to: ./mysql -u root -p
    -mysql was back up, but Wordpress was still broken.
    -changed 'localhost' to '127.0.0.1' in wp-config.php in Wordpress installations.
    -Success!


    Here's a php script from http://wordpress.org/support/topic/160033 that helped narrow down the problem:

    <?php
    $db = @mysql_connect('localhost', 'YourUser', 'YourPassword');
    if (!$db) echo "connection failed";
    else echo "connection succeeded";
    ?>

    Epilog:

    I believe changing the localhost first would have fixed everything. I actually think I caused all of my MySQL problems and that sent me down the wrong path. Symbolic or otherwise :)

    Hope this helps someone else.



    Resources:
    http://wordpress.org/support/topic/160033 - Wordpress Support

    Relared:
    Wordpress - Change the Excerpt Dots to Article Link with Read More Text


    Previous Article: CSS Hide Text Use Display None in HTML to Hide Text
    Next Article: Wordpress Change the Excerpt Dots to Article Link with Read More Text






    Search iLTC w/ Google




    Recent Articles

  • HTML Font Code
  • Javascript and CSS - Easy Pop Up Help Balloons
  • Use OnMouseOver in Javascript
  • Use onMouseOut in Javascript
  • Use innerHTML to Change Text on a Page
  • Renaming a File with Perl's RENAME Function
  • PRINT to Browser with document.write Command in Javascript
  • Passing an Argument or Variable to a Javascript
  • Opening an Alert Box in Javascript
  • Opening a REMOTE WINDOW in Javascript
  • OPEN and WRITE a Data File in Perl
  • OPEN and READ a Data File in Perl
  • Mimic Typing from a Textfield in a Textarea with Javascript
  • Javascript Reset Form








  • Perl Programming - Javascript Programming - HTML Code - Mac Unix Command Line - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006-2009 iLoveTheCode.com


    Contact Chris | About this Site


    1724332
    Counter by iLoveTheCode.com


    Last Modified: Saturday, 17-Jan-2009 07:26:18 EST



    Hosted as well :)
    Home-brewed logo - 1997