Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

2 Stron V   1 2 >  
Reply to this topicStart new topic
> Włamanie do bazy ?
Gruchol
post
Post #1





Grupa: Zarejestrowani
Postów: 242
Pomógł: 0
Dołączył: 28.11.2014

Ostrzeżenie: (0%)
-----


Witam,
Mam ogromny problem.
Dzisiaj wszystko było ok do czasu.
Nagle na VPsie padło sudo i mysql.
Gdy wpisuje :

/etc/init.d/mysql start
Pojawia się :
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
Ja nic w nim nie robiłem dla tego nie rozumiem dla czego padło.
w var nie ma żadnych logów z mysql.
Co się mogło stać i jak to sprawdzić ?

Bardzo proszę o pomoc.
Go to the top of the page
+Quote Post
Pyton_000
post
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


sprawdź auth.log

Ten post edytował Pyton_000 12.01.2015, 23:53:21
Go to the top of the page
+Quote Post
Gruchol
post
Post #3





Grupa: Zarejestrowani
Postów: 242
Pomógł: 0
Dołączył: 28.11.2014

Ostrzeżenie: (0%)
-----


Zapis z dzisiaj wygląda tak :
http://wklej.org/id/1593554/
I dlaczego to mysql nie chce wystartować?

Mój my.conf wygląda tak :
http://wklej.org/id/1593557/

Nie rozumiem dlaczego w auth.log jest root skoro logowanie na roota jest zablokowane..

Ten post edytował Gruchol 13.01.2015, 00:16:08
Go to the top of the page
+Quote Post
com
post
Post #4





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

Ostrzeżenie: (0%)
-----


zarzynasz serwer tym cronem, napisz do supportu smile.gif
Go to the top of the page
+Quote Post
ohm
post
Post #5





Grupa: Zarejestrowani
Postów: 623
Pomógł: 144
Dołączył: 22.12.2010

Ostrzeżenie: (0%)
-----


Cytat(com @ 13.01.2015, 00:42:25 ) *
zarzynasz serwer tym cronem, napisz do supportu smile.gif


Toż to normalny cron. Żadnego zarzynania, wszystko w normie.

@Gruchol, po restarcie mysqla sprawdz /var/log/syslog (odnosnie sudo tez mozesz tam sprawdzać)
Go to the top of the page
+Quote Post
Gruchol
post
Post #6





Grupa: Zarejestrowani
Postów: 242
Pomógł: 0
Dołączył: 28.11.2014

Ostrzeżenie: (0%)
-----


Dzisiaj po restarcie mysqla w sys.log wyskoczyło coś takiego :

http://wklej.org/id/1593676/

I mam jeszcze 1 pytanko było to włamanie czy nie ?


Ten post edytował Gruchol 13.01.2015, 07:12:37
Go to the top of the page
+Quote Post
by_ikar
post
Post #7





Grupa: Zarejestrowani
Postów: 1 798
Pomógł: 307
Dołączył: 13.05.2009
Skąd: Gubin/Wrocław

Ostrzeżenie: (0%)
-----


Żadne włamanie.. W logach masz wyraźnie że mysql próbuje startować, ale wielkość pliku ib_logfile0 jest niepoprawna, przez co sam się zatrzymuje. Usuń ten plik:

Kod
sudo rm -f /var/lig/mysql/ib_logfile0


i spróbuj wystartować mysqla jeszcze raz, może plik się sam wygeneruje i mysql wystartuje normalnie. Na przyszłość nie panikuj, bo to jest niewskazane nigdzie.
Go to the top of the page
+Quote Post
Pyton_000
post
Post #8





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


literówka wink.gif
Poza tym niech wywali wszystkie
Kod
sudo rm -f /var/log/mysql/ib_logfile*


Ten post edytował Pyton_000 13.01.2015, 09:11:33
Go to the top of the page
+Quote Post
by_ikar
post
Post #9





Grupa: Zarejestrowani
Postów: 1 798
Pomógł: 307
Dołączył: 13.05.2009
Skąd: Gubin/Wrocław

Ostrzeżenie: (0%)
-----


Fakt, nawet nie zauważyłem tej literówki; ten plik jest zlokalizowany w /var/lib/mysql, nie jak inne logi. Więc poprawnie powinno być:

Kod
sudo rm -f /var/lib/mysql/ib_logfile*


Ten post edytował by_ikar 13.01.2015, 08:54:08
Go to the top of the page
+Quote Post
ohm
post
Post #10





Grupa: Zarejestrowani
Postów: 623
Pomógł: 144
Dołączył: 22.12.2010

Ostrzeżenie: (0%)
-----


Jeszcze profilaktycznie sprawdz ilosc miejsca (df -h)
Go to the top of the page
+Quote Post
Gruchol
post
Post #11





Grupa: Zarejestrowani
Postów: 242
Pomógł: 0
Dołączył: 28.11.2014

Ostrzeżenie: (0%)
-----


Usunąłem te pliki i teraz mam tak :

http://wklej.org/id/1593978/

MySQL nadal nie chce się uruchomić.
Jeden z plików który usunąłem miał 256 mb.

A komenda df -h pokazuje :

Filesystem Size Used Avail Use% Mounted on
/dev/ploop22133p1 9.9G 3.0G 6.5G 32% /
none 512M 4.0K 512M 1% /dev
none 103M 1.3M 102M 2% /run
none 5.0M 0 5.0M 0% /run/lock
none 308M 0 308M 0% /run/shm
none 100M 0 100M 0% /run/user
Go to the top of the page
+Quote Post
Pyton_000
post
Post #12





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


wywal /var/run/mysqld/mysqld.sock
Go to the top of the page
+Quote Post
by_ikar
post
Post #13





Grupa: Zarejestrowani
Postów: 1 798
Pomógł: 307
Dołączył: 13.05.2009
Skąd: Gubin/Wrocław

Ostrzeżenie: (0%)
-----


Kod
sudo service mysql restart


Jeżeli nie będzie działać, to się uruchomi, jeżeli będzie działać, to się zrestartuje. IMO kwestia uprawnień, więc koniecznie użyj jako sudo.
Go to the top of the page
+Quote Post
Gruchol
post
Post #14





Grupa: Zarejestrowani
Postów: 242
Pomógł: 0
Dołączył: 28.11.2014

Ostrzeżenie: (0%)
-----


Napisałem na początku w temacie że sudo też padło.
Gdy wpiszę coś z sudo pojawia się :

sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

A ten katalog jest u mnie pusty :
/run/mysqld
Nic w nim nie ma.

Ten post edytował Gruchol 13.01.2015, 14:28:48
Go to the top of the page
+Quote Post
ohm
post
Post #15





Grupa: Zarejestrowani
Postów: 623
Pomógł: 144
Dołączył: 22.12.2010

Ostrzeżenie: (0%)
-----


Czyli próbujesz zrestartować mysqla z normalnego użytkownika?

Hasło na roota ustawiałeś? Jeśli tak, to zaloguj się przez su.
Go to the top of the page
+Quote Post
Gruchol
post
Post #16





Grupa: Zarejestrowani
Postów: 242
Pomógł: 0
Dołączył: 28.11.2014

Ostrzeżenie: (0%)
-----


Zalogowałem się na roota
i jest cały czas tak samo :

http://screenshooter.net/101736853/brpqoor
Go to the top of the page
+Quote Post
Pyton_000
post
Post #17





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


Wywal sudo i zainstaluj jeszcze raz...
Go to the top of the page
+Quote Post
Gruchol
post
Post #18





Grupa: Zarejestrowani
Postów: 242
Pomógł: 0
Dołączył: 28.11.2014

Ostrzeżenie: (0%)
-----


Przy usuwaniu :

Kod
gruszekpietruszek@srvwinkiel70:/root$ apt-get purge sudo*
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Note, selecting 'gosa-plugin-sudo-schema' for regex 'sudo*'
Note, selecting 'gnome-sudoku' for regex 'sudo*'
Note, selecting 'kdesudo' for regex 'sudo*'
Note, selecting 'dpsyco-sudo' for regex 'sudo*'
Note, selecting 'sudo-ldap' for regex 'sudo*'
Note, selecting 'sudo' for regex 'sudo*'
Note, selecting 'libsss-sudo-dev' for regex 'sudo*'
Note, selecting 'gosa-plugin-sudo' for regex 'sudo*'
Note, selecting 'ksudoku' for regex 'sudo*'
Note, selecting 'libsss-sudo0' for regex 'sudo*'
Note, selecting 'python-suds' for regex 'sudo*'
Note, selecting 'gnome-sudo' for regex 'sudo*'
Note, selecting 'vdr-plugin-sudoku' for regex 'sudo*'
Note, selecting 'sudoku' for regex 'sudo*'
Note, selecting 'gksu' instead of 'gnome-sudo'
Package 'dpsyco-sudo' is not installed, so not removed
Package 'gnome-sudoku' is not installed, so not removed
Package 'gosa-plugin-sudo' is not installed, so not removed
Package 'gosa-plugin-sudo-schema' is not installed, so not removed
Package 'ksudoku' is not installed, so not removed
Package 'kdesudo' is not installed, so not removed
Package 'libsss-sudo-dev' is not installed, so not removed
Package 'libsss-sudo0' is not installed, so not removed
Package 'sudo-ldap' is not installed, so not removed
Package 'sudoku' is not installed, so not removed
Package 'python-suds' is not installed, so not removed
Package 'vdr-plugin-sudoku' is not installed, so not removed
The following package was automatically installed and is no longer required:
  dbconfig-common
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  sudo*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1882 kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: error: requested operation requires superuser privilege
E: Sub-process /usr/bin/dpkg returned an error code (2)


Usuwanie na root :

Kod
root@srvwinkiel70:~# apt-get purge sudo*
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Note, selecting 'gosa-plugin-sudo-schema' for regex 'sudo*'
Note, selecting 'gnome-sudoku' for regex 'sudo*'
Note, selecting 'kdesudo' for regex 'sudo*'
Note, selecting 'dpsyco-sudo' for regex 'sudo*'
Note, selecting 'sudo-ldap' for regex 'sudo*'
Note, selecting 'sudo' for regex 'sudo*'
Note, selecting 'libsss-sudo-dev' for regex 'sudo*'
Note, selecting 'gosa-plugin-sudo' for regex 'sudo*'
Note, selecting 'ksudoku' for regex 'sudo*'
Note, selecting 'libsss-sudo0' for regex 'sudo*'
Note, selecting 'python-suds' for regex 'sudo*'
Note, selecting 'gnome-sudo' for regex 'sudo*'
Note, selecting 'vdr-plugin-sudoku' for regex 'sudo*'
Note, selecting 'sudoku' for regex 'sudo*'
Note, selecting 'gksu' instead of 'gnome-sudo'
Package 'dpsyco-sudo' is not installed, so not removed
Package 'gnome-sudoku' is not installed, so not removed
Package 'gosa-plugin-sudo' is not installed, so not removed
Package 'gosa-plugin-sudo-schema' is not installed, so not removed
Package 'ksudoku' is not installed, so not removed
Package 'kdesudo' is not installed, so not removed
Package 'libsss-sudo-dev' is not installed, so not removed
Package 'libsss-sudo0' is not installed, so not removed
Package 'sudo-ldap' is not installed, so not removed
Package 'sudoku' is not installed, so not removed
Package 'python-suds' is not installed, so not removed
Package 'vdr-plugin-sudoku' is not installed, so not removed
The following package was automatically installed and is no longer required:
  dbconfig-common
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  sudo*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1882 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 33790 files and directories currently installed.)
Removing sudo ...
Purging configuration files for sudo ...
Processing triggers for man-db ...
fopen: Permission denied


Ok, sudo się usunęło teraz instaluje je od nowa.

Ten post edytował Gruchol 13.01.2015, 15:10:35
Go to the top of the page
+Quote Post
ohm
post
Post #19





Grupa: Zarejestrowani
Postów: 623
Pomógł: 144
Dołączył: 22.12.2010

Ostrzeżenie: (0%)
-----


Dodawanie i usuwanie pakietów rób z roota. Co do restartu, daj jeszcze raz logi.
Komunikat odnosnie sudo masz jak byk (zmien wlasciciela - chown root.root /etc/sudoers )

Go to the top of the page
+Quote Post
Gruchol
post
Post #20





Grupa: Zarejestrowani
Postów: 242
Pomógł: 0
Dołączył: 28.11.2014

Ostrzeżenie: (0%)
-----


Nadal :/

root@srvwinkiel70:~# sudo service mysql restart
[ ok ] Stopping MySQL database server: mysqld.
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
root@srvwinkiel70:~#


Logi :

http://wklej.org/id/1594039/
Go to the top of the page
+Quote Post

2 Stron V   1 2 >
Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 18:33