Eu tenho o servidor MySQL instalado em uma micro instância do AWS EC2. O servidor estava iniciando / parando corretamente com serviço sudo mysql start / stop , mas parou de funcionar desde que eu fiz pequenas alterações no arquivo de configuração (alterei os valores da porta e comentei a linha de endereço bind).
Agora, quando eu faço sudo service, o mysql start diz start: o job não pôde ser iniciado .
Eu também tentei fazer o sudo mysqld --port xx mas ainda assim não funcionaria.
Sou muito novo nessa área, então qualquer ajuda seria ótima.
EDIT: Aqui está a configuração
[client]
port = xx
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = xx
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
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 = (local ip address)
#
# * 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
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
Eu não vou postar mais da configuração, pois são apenas as configurações padrão
ERRO (vim /var/log/mysql/error.log):
140811 20:20:29 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140811 20:20:29 [Note] Plugin 'FEDERATED' is disabled.
140811 20:20:29 InnoDB: The InnoDB memory heap is disabled
140811 20:20:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140811 20:20:29 InnoDB: Compressed tables use zlib 1.2.8
140811 20:20:29 InnoDB: Using Linux native AIO
140811 20:20:29 InnoDB: Initializing buffer pool, size = 128.0M
140811 20:20:29 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
140811 20:20:29 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
140811 20:20:30 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...
140811 20:20:31 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: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
140811 20:20:32 InnoDB: Waiting for the background threads to start
140811 20:20:33 InnoDB: 5.5.38 started; log sequence number 0
140811 20:20:34 InnoDB: Starting shutdown...
140811 20:20:35 InnoDB: Shutdown completed; log sequence number 1595675
140811 20:20:36 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140811 20:20:36 [Note] Plugin 'FEDERATED' is disabled.
140811 20:20:36 InnoDB: The InnoDB memory heap is disabled
140811 20:20:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140811 20:20:36 InnoDB: Compressed tables use zlib 1.2.8
140811 20:20:36 InnoDB: Using Linux native AIO
140811 20:20:36 InnoDB: Initializing buffer pool, size = 128.0M
140811 20:20:36 InnoDB: Completed initialization of buffer pool
140811 20:20:36 InnoDB: highest supported file format is Barracuda.
140811 20:20:36 InnoDB: Waiting for the background threads to start
140811 20:20:37 InnoDB: 5.5.38 started; log sequence number 1595675
140811 20:20:38 InnoDB: Starting shutdown...
140811 20:20:39 InnoDB: Shutdown completed; log sequence number 1595675
MAIS ERROS: (dmesg | grep -i mysql)
... (pattern repeating)
[8847299.168709] init: mysql main process (1199) terminated with status 1
[8847299.168739] init: mysql main process ended, respawning
[8847299.246279] init: mysql post-start process (1200) terminated with status 1
[8847299.270609] type=1400 audit(1407875066.958:80): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/mysqld" pid=1246 comm="apparmor_parser"
[8847301.287139] init: mysql main process (1258) terminated with status 1
[8847301.287169] init: mysql respawning too fast, stopped
sobre endereço de ligação: não sei ao certo o que devo definir como endereço de ligação. definindo que para 0.0.0.0 trabalhou para mongodb mas pelo que vejo aqui eu não deveria fazer isso? isso é apenas para testes de desempenho, então não preciso me preocupar com segurança.
Mais EDIT: Quando eu mudo os valores de porta no arquivo de configuração, ele funciona novamente, mas infelizmente sou forçado a usar uma porta específica.
EDIÇÃO FINAL:
Bem, eu passei cerca de 7 horas tentando corrigir esse problema, mas no final não tive sucesso. Eu pedi ao meu chefe para abrir a porta 3306 e usei isso.
Tags mysql