Zdravím,
řeším respektive spíše experimentuji s DRBD. Zprovoznil jsem DRBD a t v režimu primary-primary. V tuto chvíli bych chtěl zkusit zprovoznit mysql server na těchto dvou strojích. Nainstaloval jsem Apache2 přes tasksel. Následne jsem překopíroval /var/www na /drbd/www a následně vytvořil symbolický odkaz.
Ale nedaří jse mi zprovoznit mysql.
Zde je nastavení my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /drbd/mysql/socket/mysqld.sock
#socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
[mysqld_safe]
socket = /drbd/mysql/socket/mysqld.sock
#socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
#
# * IMPORTANT
# If you make changes to these settings and your system uses apparmor, you may
# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#
datadir = /drbd/mysql/data
user = mysql
socket = /drbd/mysql/socket/mysqld.sock
#socket = /var/run/mysqld/mysqld.sock
port = 3306
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
datadir = /drbd/mysql/data
user = mysql
socket = /drbd/mysql/socket/mysqld.sock
#socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
#datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
V syslogu je toto:
Jun 7 17:20:40 node2 kernel: [ 952.472402] init: mysql respawning too fast, stopped
Jun 7 17:22:45 node2 kernel: [ 1076.853978] init: mysql main process (15661) terminated with status 1
Jun 7 17:22:45 node2 kernel: [ 1076.854027] init: mysql main process ended, respawning
Jun 7 17:22:45 node2 kernel: [ 1077.137708] init: mysql post-start process (15662) terminated with status 1
Jun 7 17:22:47 node2 kernel: [ 1078.898448] init: mysql main process (15713) terminated with status 1
Jun 7 17:22:47 node2 kernel: [ 1078.898497] init: mysql main process ended, respawning
Jun 7 17:22:47 node2 kernel: [ 1079.190209] init: mysql post-start process (15714) terminated with status 1
Jun 7 17:22:49 node2 kernel: [ 1080.963235] init: mysql main process (15764) terminated with status 1
Jun 7 17:22:49 node2 kernel: [ 1080.963281] init: mysql respawning too fast, stopped
Jun 7 17:32:43 node2 kernel: [ 1673.712627] init: mysql main process (23755) terminated with status 1
Jun 7 17:32:43 node2 kernel: [ 1673.712679] init: mysql main process ended, respawning
Jun 7 17:32:43 node2 kernel: [ 1674.000727] init: mysql post-start process (23756) terminated with status 1
Jun 7 17:32:45 node2 kernel: [ 1675.751586] init: mysql main process (23824) terminated with status 1
Jun 7 17:32:45 node2 kernel: [ 1675.751637] init: mysql main process ended, respawning
Jun 7 17:32:45 node2 kernel: [ 1676.044750] init: mysql post-start process (23825) terminated with status 1
Jun 7 17:32:47 node2 kernel: [ 1677.872617] init: mysql main process (23920) terminated with status 1
Jun 7 17:32:47 node2 kernel: [ 1677.872665] init: mysql respawning too fast, stopped
Jun 7 17:42:15 node2 kernel: [ 2245.212542] init: mysql pre-start process (31959) terminated with status 1
Jun 7 17:46:20 node2 kernel: [ 2489.277083] init: mysql pre-start process (3364) terminated with status 1
Jun 7 17:50:24 node2 kernel: [ 2732.823080] init: mysql pre-start process (6408) terminated with status 1
Jun 7 17:50:29 node2 kernel: [ 2738.098066] init: mysql pre-start process (6430) terminated with status 1
Jun 7 17:52:47 node2 kernel: [ 2875.554016] init: mysql pre-start process (8498) terminated with status 1
Jun 7 18:00:29 node2 kernel: [ 3336.758543] init: mysql pre-start process (14943) terminated with status 1
Jun 7 18:07:48 node2 kernel: [ 11.545701] init: mysql pre-start process (857) terminated with status 1
Jun 7 18:15:33 node2 kernel: [ 475.689694] init: mysql pre-start process (7886) terminated with status 1
Jun 7 18:17:36 node2 kernel: [ 599.083636] init: mysql pre-start process (9433) terminated with status 1
Jun 7 18:17:40 node2 kernel: [ 602.810441] init: mysql pre-start process (9455) terminated with status 1
Jun 7 18:20:20 node2 kernel: [ 763.099256] init: mysql pre-start process (11477) terminated with status 1
Jun 7 18:23:10 node2 kernel: [ 932.766139] init: mysql pre-start process (13518) terminated with status 1
A v /var/log/mysql/error.log jsem narazil na toto:
120607 20:23:50 InnoDB: The InnoDB memory heap is disabled
120607 20:23:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120607 20:23:50 InnoDB: Compressed tables use zlib 1.2.3.4
120607 20:23:50 InnoDB: Initializing buffer pool, size = 128.0M
120607 20:23:50 InnoDB: Completed initialization of buffer pool
120607 20:23:50 InnoDB: highest supported file format is Barracuda.
120607 20:23:50 InnoDB: Waiting for the background threads to start
120607 20:23:51 InnoDB: 1.1.8 started; log sequence number 1595675
120607 20:23:51 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120607 20:23:53 mysqld_safe Starting mysqld daemon with databases from /drbd/mysql/data
120607 20:23:53 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
120607 20:23:53 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120607 20:23:53 InnoDB: The InnoDB memory heap is disabled
120607 20:23:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120607 20:23:53 InnoDB: Compressed tables use zlib 1.2.3.4
120607 20:23:53 InnoDB: Initializing buffer pool, size = 128.0M
120607 20:23:53 InnoDB: Completed initialization of buffer pool
120607 20:23:53 InnoDB: highest supported file format is Barracuda.
120607 20:23:53 InnoDB: Waiting for the background threads to start
120607 20:23:54 InnoDB: 1.1.8 started; log sequence number 1595675
120607 20:23:54 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120607 20:23:54 mysqld_safe mysqld from pid file /drbd/mysql/data/node2.pid ended
Zkoušel jsem spustit mysql přes safe mod.
root@node2:~# mysqld_safe --user=mysql&
[1] 28125
root@node2:~# 120607 20:10:53 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
120607 20:10:53 mysqld_safe Logging to '/var/log/mysql/error.log'.
120607 20:10:53 mysqld_safe Starting mysqld daemon with databases from /drbd/mysql/data
120607 20:10:54 mysqld_safe mysqld from pid file /drbd/mysql/data/node2.pid ended
Mohl by jste mě prosím někdo trošku nakopnout co dělám špatně?
Předem moc děkuji za reakce.