Restore mysql (4 posts)

  1. thornomad
    Posted 10 years ago #


    I have been having a problem with mysql on my local machine (Mac OS 10.4.4). (Original problem post here.)

    I just realized that I do have a complete backup of my system on my firewire drive (it is bootable -- all files, permissions, everything are copied).

    Is there a way for me to just overwrite my current non-functioning mysql files with the ones that were working last month? Some simple terminal overwrite commands I could use ?

    (I don't care about the data, just trying to get it up and running so I can make some changes to my theme before uploading them to my live server.)



  2. iand
    Posted 10 years ago #

    If you don't care about the data, then there are couple of things here that may help:
    http://www.entropy.ch/software/macosx/mysql/ (esp reinitialisation)
    http://www.entropy.ch/software/macosx/mysql/remove-old-mysql.html (complete obliteration for a reinstall)

    Or you could track down MAMP which is the Mac equivalent of XAMPP

  3. thornomad
    Posted 10 years ago #

    Thanks for those links. I appreciate it. I will have to look into that ... it's never easy!

  4. thornomad
    Posted 10 years ago #


    I haven't tried to restore the database files yet from my backup, but what I ended up doing to solve all these permissions issues and everything wss this (this did not restore any of my database files, everything was fresh):

    I Downloaded mysql 4.1 again; I opened the package and reinstalled it. This created a different version directory and reset the aliases to the program on my system.

    In terminal, I created two shortcuts:

    alias mysql=/usr/local/mysql/bin/mysql
    alias mysqladmin=/usr/local/mysql/bin/mysqladmin

    Then I followed the MacZealots Instructions for setting up mysql, typed in terminal:

    cd /usr/local/mysql
    sudo chown -R mysql data/
    sudo echo
    sudo ./bin/mysqld_safe &

    (I don't know what that does exactly, but I think it has to do with setting the correct permissions for the /data/ directory that mysql accesses when it is running on the system, but I did it anyway)

    Then I set the password for my root@localhost account, hoping it would clear up the past problems I had been having:

    /usr/local/mysql/bin/mysqladmin -u root password yourpasswordhere

    Then I loaded up mysql:

    mysql -u root -p

    I entered my new password -- it worked! -- then at the mysql> prompt I created a new database:

    CREATE DATABASE wordpress;

    And I was ready to go ... had to run the install.php file again but that was it. Everything is back ... can work on my themes again.

    Sigh. Thanks for your help.


Topic Closed

This topic has been closed to new replies.

About this Topic