Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9242057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:30:04+00:00 2026-06-18T08:30:04+00:00

On my server two websites are hosted (say abc.com and test.xyz.com) I was trying

  • 0

On my server two websites are hosted (say abc.com and test.xyz.com)

I was trying to rebuild the DB for test.xyz.com and in the process

1.I dropped the database related to it.
2.stopped the mysql ( /etc/init.d/mysqld stop)
3.moved ibdata1 file (/var/lib/mysql/ibdata1) to /tmp/
4. tried to start the mysql

but it is not getting started and on trying to connect to database using terminal, i am getting Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'.

I tried to move back ibdata1 file from /tmp/ to /var/lib/mysql but there was already a file ibdata1. Its a wonder but now website is not working since NO DB connection.

Both the sites stopped working now. Please help

and-
/etc/init.d/mysqld status gives – mysqld (pid 31905) is running…

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:30:05+00:00Added an answer on June 18, 2026 at 8:30 am

    Quick fix:

    • Stop your server
    • Delete the newly created ibdata1 file in /var/lib/mysql. This file is created automatically when it doesn’t exist. Also note, it most likely contains the data for all your databases on the server.
    • Copy the ibdata1 from your tmp folder back to /var/lib/mysql
    • Start server again

    I’ll explain later, when I have more time, but I think it might be urgent for you to have that quick fix 🙂

    UPDATE: (From comments) You can’t connect, okay, the cause for this could be anything. I think the best thing to do (you don’t have much to loose anyway) is you simply kill mysql.

    Do

    ps aux | grep mysqld
    

    Then

    kill -9 <the processnumber of mysql from the previous command>
    

    Then do as I said earlier. And never ever simply move ibdata1 again 🙂

    Also I’m voting to close as offtopic. Then it’s going to be moved to dba.stackexchange.com which is a partner site that is more dedicated to administrating database servers. You might get better help there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two websites hosted on the same IIS server. SiteA contains WCF services
I am trying to host two websites using Apache from the same Ubuntu server.
I only have two websites pointed to my server IP, Asite.com and Bsite.com .
I have two websites running on the same Windows 2008r2 64bit server, SQL Server
I have two websites running on my own root server (ubuntu/nginx/php-fpm). Now I want
Let's say I have two SQL Server databases running on separate machines, call them
I have two websites on IIS 6 that throw server errors when they are
I have two separate websites on the same server. One site is a forum
I have two websites that will share some resources, lets say, index.php, functions.js and
Scenario: We have a server where there are multiple ASP.NET websites hosted on it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.