Ubuntu - most of MSQL directories deleted. - Geeks to Go Forums

Jump to content

Log in Register Register Malware removal guide How it works

Ubuntu - most of MSQL directories deleted.

#1 tcih

  • Group: Member
  • Posts: 18
  • Joined: 27-March 08

Posted 25 July 2011 - 08:48 AM

Heip,

I have problem with Ubuntu 10.04.2 Server edition.
It was sabotaged by deleting all the mysql and mysqld folders in it.

Tryed removing, reinstalling mysql, but it does recreate only few folders and files.
Default files that come with base install of ubuntu are still gone. Without them i cant start the MSQL server.
The MSQL was not configured nor had any DB's, but I have a need for MySql now.

For example my mysqld.sock is missing. Linking the one in /tmp does not work.

I have no backup. :)

#2 devper94

  • Group: Member
  • Posts: 816
  • Joined: 16-September 10

Posted 27 July 2011 - 08:30 AM

Hope this isn't too late.
Run
sudo apt-get remove --purge mysql-server*
sudo apt-get install mysql-server
# add more package if needed
# if necessary run:
#dpkg-reconfigure mysql-server-VERSION


#3 tcih

  • Group: Member
  • Posts: 18
  • Joined: 27-March 08

Posted 28 July 2011 - 03:10 AM

Hi Junior :)

I bet /var/run/mysqld dir was also removed. I did purge remove and also install again without errors and then i did dpkg reconfigure, entered new pw and that was it.

root@gn49:~# dpkg-reconfigure mysql-server-5.1
stop: Unknown instance:
110728 11:49:06 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't create/write to file '/tmp/ibiLjyki' (Errcode: 13)
110728 11:49:06  InnoDB: Error: unable to create temporary file; errno: 13
110728 11:49:06 [ERROR] Plugin 'InnoDB' init function returned error.
110728 11:49:06 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
start: Job failed to start


root@gn49:/etc/init.d# mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

root@gn49:/# find -name mysqld.sock
root@gn49:/#


#4 devper94

  • Group: Member
  • Posts: 816
  • Joined: 16-September 10

Posted 28 July 2011 - 07:34 AM

Error log please

http://dev.mysql.com...erver-logs.html

P/s: my name is devper94 :)

#5 tcih

  • Group: Member
  • Posts: 18
  • Joined: 27-March 08

Posted 28 July 2011 - 10:10 AM

I know, just noticed that i have been registered here longer than You :)

Here is the log:
mysqld --user=root --log-error &




110728 19:18:07 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
110728 19:18:07  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
110728 19:18:08  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
110728 19:18:08  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
110728 19:18:08  InnoDB: Started; log sequence number 0 0
110728 19:18:08 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
110728 19:18:08 [ERROR] Do you already have another mysqld server running on port: 3306 ?
110728 19:18:08 [ERROR] Aborting

110728 19:18:08  InnoDB: Starting shutdown...
110728 19:18:09  InnoDB: Shutdown completed; log sequence number 0 44233
110728 19:18:09 [Note] mysqld: Shutdown complete




#6 devper94

  • Group: Member
  • Posts: 816
  • Joined: 16-September 10

Posted 29 July 2011 - 02:57 AM

Quote

110728 19:18:08 [ERROR] Do you already have another mysqld server running on port: 3306 ?

You might want to run service mysqld stop then service mysqld start.
That's the proper way to start mysqld.

#7 tcih

  • Group: Member
  • Posts: 18
  • Joined: 27-March 08

Posted 29 July 2011 - 09:01 AM

root@gn49:/etc/init.d# service mysqld stop
mysqld: unrecognized service
root@gn49:/etc/init.d# service mysql stop
stop: Unknown instance:
root@gn49:/etc/init.d#


#8 devper94

  • Group: Member
  • Posts: 816
  • Joined: 16-September 10

Posted 29 July 2011 - 09:04 AM

Have you tried service mysql start and then connect to the MySQL server?

#9 tcih

  • Group: Member
  • Posts: 18
  • Joined: 27-March 08

Posted 02 August 2011 - 06:19 AM

View Postdevper94, on 29 July 2011 - 09:04 AM, said:

Have you tried service mysql start and then connect to the MySQL server?


Yes

~# service mysql start
start: Job failed to start


*Sorry i was afk for a few days.

#10 devper94

  • Group: Member
  • Posts: 816
  • Joined: 16-September 10

Posted 02 August 2011 - 10:06 PM

After starting up is mysqld running?
First kill any mysqld running, then service mysql start.
If you get no error, then try to connect.
If you get errors, killall mysqld again to be sure, then mysqld --user=root --log-error and redirect the error to a log file.
Also post the files /var/log/mysql*

#11 tcih

  • Group: Member
  • Posts: 18
  • Joined: 27-March 08

Posted 22 November 2011 - 09:49 PM

It can not be solved, have ben looking into this topic for verly long time, close please

#12 devper94

  • Group: Member
  • Posts: 816
  • Joined: 16-September 10

Posted 24 November 2011 - 08:39 AM

I don't think this is a completely lost case.

Purge the MySQL packages, clean up everything left and install it again.

#13 tcih

  • Group: Member
  • Posts: 18
  • Joined: 27-March 08

Posted 24 November 2011 - 06:08 PM

Well i remember that i tryed purge also, but that did not make any much change.

Share this topic: