[vpsFree.cz: community-list] mysql problem
Jirka Bourek
trekker.dk at abclinuxu.cz
Mon Aug 6 09:08:46 CEST 2012
Když ten mysqlcheck doběhne takhle, tak v logu DB nic není? Třeba popis
chyby nebo info o tom, že se DB restartovala. Pokud si dobře vzpomínám,
ve výpisu show table status by mohlo být nějaké info ke konkrétní
tabulce, proč ji nejde obnovit. (Pokud nemáš nějak divně přenastavené
lgoování, info o poškozených tabulkách by tam mělo být.)
Btw. nevím, proč se při opravě tabulky pouští optimize table, možná by
bylo lepší zkontrolovat a opravit poškozené tabulky ručně (na verzi 5 se
oprava normálně dělá sama, když se přistoupí k poškozené tabulce, tzn.
ruční oprava bude potřeba jenom tam, kde je nějaký problém.)
Dusan Simek wrote:
> Diky ...
> zatim jsem tedy pokrocil takto:
>
> 1/ myisam tabulky vypadaji ok, tam repair, check, optimize proslo ok
> 2/ inndodb tabulky konci errorem:
>
> mysqlcheck: Got error: 2013: Lost connection to MySQL server during
> query when executing 'OPTIMIZE TABLE ... '
>
> zatim to tedy vypada ze budu muset udelat neco takoveho:
>
> http://www.mysqlperformanceblog.com/2008/07/04/recovering-innodb-table-corruption/
>
>
> pokud tedy nemate nikdo nejaky jiny napad.
>
> Diky.
>
> Dusan
>
> On 08/05/2012 04:25 PM, Pavel Snajdr wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Prinejhorsim ti experimentalne zpristupnim zalohu a budes si moct
>> vytahnout drivejsi snapshoty mysql dat, doufam ze aspon jeden z nich
>> bude konzistentni.
>>
>> S pozdravem
>>
>> Pavel Snajdr
>>
>> +421 948 816 186 | +420 720 107 791 | 110-010-956
>> CTO of Relbit | Predseda vpsFree.cz, o.s. | RHCE
>> http://relbit.com | http://vpsfree.cz | https://www.redhat.com
>>
>> On 08/05/2012 03:50 PM, Dusan Simek wrote:
>>> Nezkousel, zkusim, o ty poskozeny intergite jsem taky premyslel.
>>>
>>> V priloze by mel byt my.cnf, jestli to projde.
>>>
>>> Dusan
>>>
>>> On 08/05/2012 03:45 PM, Tomas Srnka wrote:
>>>> http://www.cafewebmaster.com/repair-all-mysql-databases-tables-php
>>>> -> take nieco si skusal? Mozes mat poskodenu integritu
>>>> niektorych tabuliek. Idealne si napis skript, co zbehne CHECK a
>>>> REPAIR na vsetky tabulky vo vsetkych DB.
>>>>
>>>> On Aug 5, 2012, at 3:38 PM, Dusan Simek <pixelfields at gmail.com>
>>>> wrote:
>>>>
>>>>> Ahoj chlapci, ten patecni vypadek/presun vps mi nejak rozbil
>>>>> mysql. Chtel bych poprosit o info, jak to opravit, pokud s tim
>>>>> mate nekdo nejakou zkusenost. Situace je nasledujici:
>>>>>
>>>>> Pri nekterych requestech (je to nahodne, 10 requestu ok, 11
>>>>> zfailuje) dojde ke bude k chybe pri pripojeni, nebo ke ztrate
>>>>> spojeni. V logu vidim nasledujici:
>>>>>
>>>>> bud:
>>>>>
>>>>> OperationalError: (2013, "Lost connection to MySQL server at
>>>>> 'reading initial communication packet', system error: 104")
>>>>>
>>>>> nebo:
>>>>>
>>>>> OperationalError: (2003, "Can't connect to MySQL server on
>>>>> '83.167.228.14' (111)")
>>>>>
>>>>> nebo:
>>>>>
>>>>> OperationalError: (2002, "Can't connect to local MySQL server
>>>>> through socket '/var/run/mysqld/mysqld.sock' (2)")
>>>>>
>>>>> mysql vypada, ze bezi normalne:
>>>>>
>>>>> netstat -tupan | grep mysql tcp 0 0 0.0.0.0:3306
>>>>> 0.0.0.0:* LISTEN 26693/mysqld
>>>>>
>>>>> ps ax | grep mysql 12488 ? S 0:04 /bin/sh
>>>>> /usr/bin/mysqld_safe 26869 ? Sl 0:02
>>>>> /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql
>>>>> --user=mysql --log-error=/var/lib/mysql/msa.err
>>>>> --pid-file=/var/lib/mysql/msa.pid
>>>>> --socket=/var/run/mysqld/mysqld.sock --port=3306
>>>>>
>>>>> socket vypada ok:
>>>>>
>>>>> ls -la /var/run/mysqld/ total 8 drwxr-xr-x 2 mysql mysql 4096
>>>>> Aug 5 15:32 . drwxr-xr-x 20 root root 4096 Aug 5 10:46 ..
>>>>> srwxrwxrwx 1 mysql mysql 0 Aug 5 15:32 mysqld.sock
>>>>>
>>>>>
>>>>> Kdyz zkusim mysql restartovat, dostanu nasledujici:
>>>>>
>>>>> /etc/init.d/mysql restart Stopping MySQL database server:
>>>>> mysqld. Starting MySQL database server: mysqld. Checking for
>>>>> corrupt, not cleanly closed and upgrade needing tables..
>>>>> msa:.../home/dsimek > ERROR 2013 (HY000) at line 1: Lost
>>>>> connection to MySQL server during query ERROR 2002 (HY000):
>>>>> Can't connect to local MySQL server through socket
>>>>> '/var/run/mysqld/mysqld.sock' (111) ERROR 2002 (HY000): Can't
>>>>> connect to local MySQL server through socket
>>>>> '/var/run/mysqld/mysqld.sock' (2) ....
>>>>>
>>>>> v logu pri startu vidim toto:
>>>>>
>>>>> Aug 5 10:26:33 msa /etc/mysql/debian-start[30658]: Upgrading
>>>>> MySQL tables if necessary. Aug 5 10:26:33 msa
>>>>> /etc/mysql/debian-start[30664]: /usr/bin/mysql_upgrade: the
>>>>> '--basedir' option is always ignored Aug 5 10:26:33 msa
>>>>> /etc/mysql/debian-start[30664]: Looking for 'mysql' as:
>>>>> /usr/bin/mysql Aug 5 10:26:33 msa
>>>>> /etc/mysql/debian-start[30664]: Looking for 'mysqlcheck' as:
>>>>> /usr/bin/mysqlcheck Aug 5 10:26:33 msa
>>>>> /etc/mysql/debian-start[30664]: This installation of MySQL is
>>>>> already upgraded to 5.1.63, use --force if you still need to
>>>>> run mysql_upgrade Aug 5 10:26:33 msa
>>>>> /etc/mysql/debian-start[30672]: Checking for insecure root
>>>>> accounts. Aug 5 10:26:33 msa /etc/mysql/debian-start[30677]:
>>>>> Triggering myisam-recover for all MyISAM tables
>>>>>
>>>>> Diky za jakykoliv tip.
>>>>>
>>>>> Dusan _______________________________________________
>>>>> Community-list mailing list Community-list at lists.vpsfree.cz
>>>>> http://lists.vpsfree.cz/listinfo/community-list
>>>>
>>>> _______________________________________________ Community-list
>>>> mailing list Community-list at lists.vpsfree.cz
>>>> http://lists.vpsfree.cz/listinfo/community-list
>>>>
>>>
>>>
>>> _______________________________________________ Community-list
>>> mailing list Community-list at lists.vpsfree.cz
>>> http://lists.vpsfree.cz/listinfo/community-list
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.12 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iF4EAREIAAYFAlAeglAACgkQdh+64ds5DaacSwD/eG8sDfT9ycREamDJW5D6Iny3
>> 1Vy3XCg3RahKLAqrfjAA/R7jp3yPam63I5dtv/dbFTXw27WfyfUtAaXQT3UdxljG
>> =Fpgl
>> -----END PGP SIGNATURE-----
>> _______________________________________________
>> Community-list mailing list
>> Community-list at lists.vpsfree.cz
>> http://lists.vpsfree.cz/listinfo/community-list
>>
> _______________________________________________
> Community-list mailing list
> Community-list at lists.vpsfree.cz
> http://lists.vpsfree.cz/listinfo/community-list
More information about the Community-list
mailing list