Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Ubuntu - most of MSQL directories deleted.


  • Please log in to reply

#1
tcih

tcih

    Member

  • Member
  • PipPip
  • 18 posts
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. :)
  • 0

Advertisements


#2
devper94

devper94

    Member

  • Member
  • PipPipPip
  • 817 posts
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

  • 0

#3
tcih

tcih

    Member

  • Topic Starter
  • Member
  • PipPip
  • 18 posts
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.

[email protected]:~# 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


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

[email protected]:/# find -name mysqld.sock
[email protected]:/#

Edited by tcih, 28 July 2011 - 03:11 AM.

  • 0

#4
devper94

devper94

    Member

  • Member
  • PipPipPip
  • 817 posts
Error log please

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

P/s: my name is devper94 :)
  • 0

#5
tcih

tcih

    Member

  • Topic Starter
  • Member
  • PipPip
  • 18 posts
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



Edited by tcih, 28 July 2011 - 10:20 AM.

  • 0

#6
devper94

devper94

    Member

  • Member
  • PipPipPip
  • 817 posts

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.
  • 0

#7
tcih

tcih

    Member

  • Topic Starter
  • Member
  • PipPip
  • 18 posts
[email protected]:/etc/init.d# service mysqld stop

mysqld: unrecognized service

[email protected]:/etc/init.d# service mysql stop

stop: Unknown instance:

[email protected]:/etc/init.d#


  • 0

#8
devper94

devper94

    Member

  • Member
  • PipPipPip
  • 817 posts
Have you tried service mysql start and then connect to the MySQL server?
  • 0

#9
tcih

tcih

    Member

  • Topic Starter
  • Member
  • PipPip
  • 18 posts

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.

Edited by tcih, 02 August 2011 - 06:20 AM.

  • 0

#10
devper94

devper94

    Member

  • Member
  • PipPipPip
  • 817 posts
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*

Edited by devper94, 02 August 2011 - 10:07 PM.

  • 0

#11
tcih

tcih

    Member

  • Topic Starter
  • Member
  • PipPip
  • 18 posts
It can not be solved, have ben looking into this topic for verly long time, close please
  • 0

#12
devper94

devper94

    Member

  • Member
  • PipPipPip
  • 817 posts
I don't think this is a completely lost case.

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

Edited by devper94, 24 November 2011 - 08:40 AM.

  • 0

#13
tcih

tcih

    Member

  • Topic Starter
  • Member
  • PipPip
  • 18 posts
Well i remember that i tryed purge also, but that did not make any much change.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP