I have MySQL server installed on an AWS EC2 micro instance. The server was starting/stopping properly with sudo service mysql start/stop, but it stopped working since I made minor changes to the config file (changed port values and commented out bind address line).
Now when I do sudo service mysql start it says start: Job failed to start.
I've also tried doing sudo mysqld --port xx but it still wouldn't work.
I'm very new to this area so any help would be great.
EDIT: Here's the config
[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
I won't post more of the config since it's just the default settings
ERROR (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
MORE ERROR: (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
about bind address: i'm not sure what I should set bind address to. setting that to 0.0.0.0 worked for mongodb but from what I see here I shouldn't do that? this is only for performance testing so I don't need to worry about security.
More EDIT: When I change the port values on the config file it works again, but sadly I'm forced to use a specific port.
Well I spent about 7 hours trying to fix this issue but in the end I was unsuccessful. I asked my boss to open up port 3306 and used that instead.