SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Uninstalling/Reinstalling MySQL

    I am having problems connecting to mysql. This is what is happening:

    COMPUTER NAME:~ USERNAME$ sudo /usr/local/mysql/bin/mysqld_safe
    Password:
    110603 09:45:47 mysqld_safe Logging to '/usr/local/mysql/data/Bernice-COMPUTER NAME'.
    110603 09:45:47 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
    110603 09:47:27 mysqld_safe mysqld from pid file /usr/local/mysql/data/COMPUTERNAME.local.pid ended

    COMPUTER NAME:~ USERNAME$ mysqladmin -u root staus
    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

    I have no idea why it won't connect unless I am typing the wrong password?
    I am learning from BYO Database driven website: using PHP & MSQL

    can you explain how to uninstall and reinstall MySQL?

  2. #2
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uninstalling MySQL on Mac OS X Leopard
    To uninstall MySQL and completely remove it (including all databases) from your Mac do the following:

    Use mysqldump to backup your databases to text files!
    Stop the database server
    sudo rm /usr/local/mysql
    sudo rm -rf /usr/local/mysql*
    sudo rm -rf /Library/StartupItems/MySQLCOM
    sudo rm -rf /Library/PreferencePanes/My*
    edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
    rm -rf ~/Library/PreferencePanes/My*
    sudo rm -rf /Library/Receipts/mysql*
    sudo rm -rf /Library/Receipts/MySQL*
    The last two lines are particularly important as otherwise, you can't install an older version of MySQL even though you think that you've completely deleted the newer version!


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
  •