Link to home
Start Free TrialLog in
Avatar of sargent240
sargent240Flag for United States of America

asked on

Mysql

I execute:

service mysql start

It just hangs and I get this in the log file.

130927 22:51:37 [Note] Plugin 'FEDERATED' is disabled.
130927 22:51:37 InnoDB: The InnoDB memory heap is disabled
130927 22:51:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130927 22:51:37 InnoDB: Compressed tables use zlib 1.2.7
130927 22:51:37 InnoDB: Using Linux native AIO
130927 22:51:37 InnoDB: Initializing buffer pool, size = 128.0M
130927 22:51:37 InnoDB: Completed initialization of buffer pool
130927 22:51:37 InnoDB: highest supported file format is Barracuda.
130927 22:51:38  InnoDB: Waiting for the background threads to start
130927 22:51:39 InnoDB: 5.5.32 started; log sequence number 1595685
130927 22:51:39 /usr/sbin/mysqld: unknown option '--skip-locking'
130927 22:51:39 Aborting

130927 22:51:39  InnoDB: Starting shutdown...
130927 22:51:40  InnoDB: Shutdown completed; log sequence number 1595685
130927 22:51:40 [Note] /usr/sbin/mysqld: Shutdown complete

130927 22:51:40 [Note] Plugin 'FEDERATED' is disabled.
130927 22:51:40 InnoDB: The InnoDB memory heap is disabled
130927 22:51:40 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130927 22:51:40 InnoDB: Compressed tables use zlib 1.2.7
130927 22:51:40 InnoDB: Using Linux native AIO
130927 22:51:40 InnoDB: Initializing buffer pool, size = 128.0M
130927 22:51:40 InnoDB: Completed initialization of buffer pool
130927 22:51:40 InnoDB: highest supported file format is Barracuda.
130927 22:51:41  InnoDB: Waiting for the background threads to start
130927 22:51:42 InnoDB: 5.5.32 started; log sequence number 1595685
130927 22:51:42 /usr/sbin/mysqld: unknown option '--skip-locking'
130927 22:51:42 Aborting

130927 22:51:42  InnoDB: Starting shutdown...
130927 22:51:43  InnoDB: Shutdown completed; log sequence number 1595685
130927 22:51:43 [Note] /usr/sbin/mysqld: Shutdown complete

130927 22:51:44 [Note] Plugin 'FEDERATED' is disabled.
130927 22:51:44 InnoDB: The InnoDB memory heap is disabled
130927 22:51:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130927 22:51:44 InnoDB: Compressed tables use zlib 1.2.7
130927 22:51:44 InnoDB: Using Linux native AIO
130927 22:51:44 InnoDB: Initializing buffer pool, size = 128.0M
130927 22:51:44 InnoDB: Completed initialization of buffer pool
130927 22:51:44 InnoDB: highest supported file format is Barracuda.
130927 22:51:44  InnoDB: Waiting for the background threads to start
130927 22:51:45 InnoDB: 5.5.32 started; log sequence number 1595685
130927 22:51:45 /usr/sbin/mysqld: unknown option '--skip-locking'
130927 22:51:45 Aborting

130927 22:51:45  InnoDB: Starting shutdown...
130927 22:51:46  InnoDB: Shutdown completed; log sequence number 1595685
130927 22:51:46 [Note] /usr/sbin/mysqld: Shutdown complete

130927 22:51:47 [Note] Plugin 'FEDERATED' is disabled.
130927 22:51:47 InnoDB: The InnoDB memory heap is disabled
130927 22:51:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130927 22:51:47 InnoDB: Compressed tables use zlib 1.2.7
130927 22:51:47 InnoDB: Using Linux native AIO
130927 22:51:47 InnoDB: Initializing buffer pool, size = 128.0M
130927 22:51:47 InnoDB: Completed initialization of buffer pool
130927 22:51:47 InnoDB: highest supported file format is Barracuda.
130927 22:51:47  InnoDB: Waiting for the background threads to start
130927 22:51:48 InnoDB: 5.5.32 started; log sequence number 1595685
130927 22:51:48 /usr/sbin/mysqld: unknown option '--skip-locking'
130927 22:51:48 Aborting

130927 22:51:48  InnoDB: Starting shutdown...
130927 22:51:49  InnoDB: Shutdown completed; log sequence number 1595685
130927 22:51:49 [Note] /usr/sbin/mysqld: Shutdown complete

130927 22:51:50 [Note] Plugin 'FEDERATED' is disabled.
130927 22:51:50 InnoDB: The InnoDB memory heap is disabled
130927 22:51:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130927 22:51:50 InnoDB: Compressed tables use zlib 1.2.7
130927 22:51:50 InnoDB: Using Linux native AIO
130927 22:51:50 InnoDB: Initializing buffer pool, size = 128.0M
130927 22:51:50 InnoDB: Completed initialization of buffer pool
130927 22:51:50 InnoDB: highest supported file format is Barracuda.
130927 22:51:50  InnoDB: Waiting for the background threads to start
130927 22:51:51 InnoDB: 5.5.32 started; log sequence number 1595685
130927 22:51:51 /usr/sbin/mysqld: unknown option '--skip-locking'
130927 22:51:51 Aborting

130927 22:51:51  InnoDB: Starting shutdown...
130927 22:51:52  InnoDB: Shutdown completed; log sequence number 1595685
130927 22:51:52 [Note] /usr/sbin/mysqld: Shutdown complete


ANY IDEAS?  Thanks!
Avatar of arnold
arnold
Flag of United States of America image

The error message explains the issue
130927 22:51:39 /usr/sbin/mysqld: unknown option '--skip-locking'
130927 22:51:39 Aborting
Check /etc/my.cnf
Are you using a script to start or are you manually trying to start it without the use of mysqld_safe?
--skip-locking was removed and replaced with --skip-external-locking in 5.5

http://dev.mysql.com/doc/refman/5.5/en/mysql-nutshell.html
Avatar of sargent240

ASKER

I am using the LinuxMint distro of Linux and I downloaded a mysql rpm file, installed the rpm, and then did the service mysql start command.
where did you get the rpm from?
how did you install it?  did you convert the rpm first?
I owe you an apology.  I gave you some bad information.  I did not download an rpm file and install from an rpm.  I went to the software manager for LinuxMint, did a search for mysql, and selected the mysql-server and installed it from the LinuxMint software manager.  Sorry about that!
Just look at /etc/my.cnf to make sure that is not where the skip-locking is set.
Comment that line out or if you must have it use seth's suggested replacement skip-external-locking

make sure to confirm the version you are using mysql --version
The client is often the same version as the server provided the same source was used to obtain each package, and in your case you are using the version that linuxmint distributes.
the file is under /etc/mysql/my.cnf in the version from the mint software manager

can you please post this file?
I am attaching the my.cnf file.  I see the line that says --skip-external-locking.
the log says "--skip-locking"
do you see that in there?
It didn't look as though the cnf file was sent with my last post do just in case I will do it again.

#
# 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            = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[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            = 3306
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            = 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
# 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
#
# Here you can see queries with especially long duration
#log_slow_queries      = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# 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
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/
is there anything in /etc/mysql/conf.d besides mysqld_safe_syslog.cnf ?
I missed the skip-locking but found the skip-external-locking.  Let me look further for skip-locking.
in the /etc/mysql/conf.d directory there is a mysqld_safe_syslog.cnf file with the following lines:

[mysqld_safe]
syslog
what version of mint?
want to make sure i'm attempting an apples to apples comparison
LinuxMint 14
ASKER CERTIFIED SOLUTION
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have three my.cnf files after executing sudo updatedb.

/etc/mysql/my.cnf
/etc/my.cnf
/etc/al/my.cnf
do grep skip /etc/my.cnf and see if that --skip-locking option appears
if it does, rename /etc/my.cnf and start mysql again
there must have been an older installation before because the mint packages don't put the config file under /etc
Bingo seth2740!  The line skip-locking appeared in the /etc/al/my.cnf file as well as the /etc/al/my.cnf file.  I changed it to skip-external-locking in both files and problem solved.  Mysql comes up and executes properly.  I don't know what file mysql is using.  How do I determine that?  Do I rename one at a time and go through the process of elimination?
you could since it's only 2 of them; my guess probably the one under /etc since that's typically the default
You referenced the same file.  Run ps -ef |grep mysql and see whether there is an option pointing to /etc/.
The simple way is pick one  change it back and restart mysql if it errors, that is the controlling file. If it does not, It is the other file.