1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Awfull MySQL nightmares!!!!

Discussion in 'General Programming Chat' started by colorfull, Mar 16, 2017.

  1. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    Hello guys recently I couldnt connect to my mysql database because mysql.sock didnt work so you might wonder that I ended up going to the actual location of the matter and deleted ibdata1 ib_logfile1 ib_logfile0,this led me to have /var/lib/mysql emptied and no database there anymore,it was so silly and I never expected that.First I didnt have a mysql.sock so I figured out that was the problem and maybe I was a little bit adventorous I admit and did what I did :)

    Now in order for me to procceed is to find the place where a copy of my database files is located,is there any place on etc?,please do inform.Also want to know if there is a way to restore accidentally erased databases if you know a way to do it,well If anyone could help me to solve the problem, I would be very much thankful
     
  2. conrulez

    conrulez Power Member

    Joined:
    Dec 29, 2009
    Messages:
    539
    Likes Received:
    429
    Gender:
    Male
    Location:
    USA
    Contact your host and see if they do backups. If they do not and you didn't make one yourself, then you're shit out of luck. Welcome to the world of databases. Guaranteed you'll never delete it again!
     
    • Thanks Thanks x 1
  3. waqas_ibrahim

    waqas_ibrahim Regular Member

    Joined:
    Nov 14, 2016
    Messages:
    244
    Likes Received:
    122
    Gender:
    Male
    Most big hosting companies backup the data even if you have not subscribed to any backup plans, but they do charge a small fee if you want to get the backup. Try to contact your hosting company.
     
  4. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    I will talk to the guy and see the alternatives he can give me thank you
     
  5. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    He says he dont do backups or at least that is what I want to believe,however some believe in binary logs,some SQL dump,some InnoDB files,well dearest readers gonna try all of this along with my orthodox and unorthodox proccedures and the help of Jesus Christ that makes me up on the ultimate power level since when Im week Iam the stronger .See ya!
     
  6. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    Well now Im back on track and for good my databases are back again on var/lib/mysql/ Ididnt use any of that simply a manual proccedure of a backup extraction and from then I got all my dump files back to their place.

    Now my concern is that mysql.sock cant be edited and I cant get to it,I just cant connect to [email protected] so
    I chowned all my databases and now they are from user mysql and group as well mysql.What do you think that seems to be the problem ,should they be of user root instead?,.,Well the way it seemed to come up from the original backup file was mysql user and mysql group.Please let me know ur opinion
     
  7. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    Well now Im back on track and for good my databases are back again on var/lib/mysql/ Ididnt use any of that simply a manual proccedure of a backup extraction and from then I got all my dump files back to their place.

    Now my concern is that mysql.sock cant be edited and I cant get to it,I just cant connect to [email protected] so
    I chowned all my databases and now they are from user mysql and group as well mysql.What do you think that seems to be the problem ,should they be of user root instead?,.,Well the way it seemed to come up from the original backup file was mysql user and mysql group.Please let me know ur opinion
     
  8. mark_iwfhosting

    mark_iwfhosting Newbie

    Joined:
    Feb 25, 2017
    Messages:
    13
    Likes Received:
    2
    Gender:
    Male
    Why would you need to edit mysql.sock? You don't because it's a special file created by the server to allow the clients and server to use a piece of the filesystem via a named pipe. You can change the location and filename in my.cnf but should not need to edit the socket file for any reason.
     
  9. colorfull

    colorfull Newbie

    Joined:
    Mar 11, 2015
    Messages:
    49
    Likes Received:
    1
    Yes it allowed me to under a diferent configuration temporarily but most of the time it is placed automatically when you restart mysqld ,it is a sign of light.
    Somehow Im supposed to be entered to mysql admin since other wise mysqld would not restart but then it blocks me telling me my credentials for mysql user aint right so maybe I need a technique in order to set the mysql admin user and password setted because somehow I getting to see that the root mysql user ~~And clear out is not the same the root user of your machine than the root user of mysql whatsoever as I told you I see it is much better to use root as mysql user but Im still trying to make it work with user mysql.

    And maybe I also need phpMyAdmin so it brings back mysql to restart or if I have mysqld restarting that means I dont need mysql to restart?