MySQL v Debian 6, zmeneny datadir

MaReK marek.olsavsky na gmail.com
Středa Říjen 17 18:16:43 CEST 2012


>
> Podívejte se do souboru /var/log/daemon.log, zda tam mysql nepise
> nejakou chybu. Pro me je to prvni soubor, kam se divam, kdyz mi blbne
> mysql :-).
>

Dobry den,
dekuji za nasmerovani, v logu je:
Oct 17 06:25:12 BlueNot mysqld: InnoDB: Unable to lock ./ibdata1, error: 11
Oct 17 06:25:12 BlueNot mysqld: InnoDB: Check that you do not already
have another mysqld process
Oct 17 06:25:12 BlueNot mysqld: InnoDB: using the same InnoDB data or log files.
Oct 17 06:25:12 BlueNot mysqld: 121017  6:25:12  InnoDB: Unable to
open the first data file
Oct 17 06:25:12 BlueNot mysqld: InnoDB: Error in opening ./ibdata1
Oct 17 06:25:12 BlueNot mysqld: 121017  6:25:12  InnoDB: Operating
system error number 11 in a file operation.
Oct 17 06:25:12 BlueNot mysqld: InnoDB: Error number 11 means
'Resource temporarily unavailable'.
Oct 17 06:25:12 BlueNot mysqld: InnoDB: Some operating system error
numbers are described at
Oct 17 06:25:12 BlueNot mysqld: InnoDB:
http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
Oct 17 06:25:12 BlueNot mysqld: InnoDB: Could not open or create data files.
Oct 17 06:25:12 BlueNot mysqld: InnoDB: If you tried to add new data
files, and it failed here,
Oct 17 06:25:12 BlueNot mysqld: InnoDB: you should now edit
innodb_data_file_path in my.cnf back
Oct 17 06:25:12 BlueNot mysqld: InnoDB: to what it was, and remove the
new ibdata files InnoDB created
Oct 17 06:25:12 BlueNot mysqld: InnoDB: in this failed attempt. InnoDB
only wrote those files full of
Oct 17 06:25:12 BlueNot mysqld: InnoDB: zeros, but did not yet use
them in any way. But be careful: do not
Oct 17 06:25:12 BlueNot mysqld: InnoDB: remove old data files which
contain your precious data!
Oct 17 06:25:12 BlueNot mysqld: 121017  6:25:12 [ERROR] Plugin
'InnoDB' init function returned error.
Oct 17 06:25:12 BlueNot mysqld: 121017  6:25:12 [ERROR] Plugin
'InnoDB' registration as a STORAGE ENGINE failed.
Oct 17 06:25:12 BlueNot mysqld: 121017  6:25:12 [ERROR] Can't start
server: Bind on TCP/IP port: Address already in use
Oct 17 06:25:12 BlueNot mysqld: 121017  6:25:12 [ERROR] Do you already
have another mysqld server running on port: 3306 ?
Oct 17 06:25:12 BlueNot mysqld: 121017  6:25:12 [ERROR] Aborting
Oct 17 06:25:12 BlueNot mysqld:
Oct 17 06:25:12 BlueNot mysqld: 121017  6:25:12 [Note]
/usr/sbin/mysqld: Shutdown complete
Oct 17 06:25:12 BlueNot mysqld:
Oct 17 06:25:12 BlueNot mysqld_safe: mysqld from pid file
/var/run/mysqld/mysqld.pid ended

Jedno řešení jsem našel na adrese
http://cglreport.zhenhua.info/2008/08/mysql-error-unable-to-lock-ibdata1.html
, bohužel toto řešení by mě připravilo o data v Moodle, jež jsou v
InnoDB (já pitomec je nenastavil innodb_file_per_table, než se
nainstaloval první moodle a teď ani data nevyexportuji :-( ).

root na BlueNot:~# ls -lah /srv/mysql
celkem 233M
drwxr-xr-x 12 mysql root  4,0K 17. říj 18.02 .
drwxr-xr-x  6 root  root    76 17. říj 12.13 ..
-rw-rw----  1 mysql mysql 106M 17. říj 18.09 ibdata1
-rw-rw----  1 mysql mysql 5,0M 17. říj 18.09 ib_logfile0
-rw-rw----  1 mysql mysql 5,0M 17. říj 17.40 ib_logfile1

Takže podle mě je owner správně, ale nevím proč si data nezamkne.

Pokud víte (někdo) dál, prosím o hint.

MaReK Olšavský


Další informace o konferenci Linux