Solved Problem with starting MySQL

Hi, I have a problem with my MySQL on FreeBSD 9.3 system.
When I type service mysql-server start, it will not start.

Here is my .err file:
Code:
151009 21:50:16 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2015-10-09 21:50:16 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-10-09 21:50:16 0 [Note] /usr/local/libexec/mysqld (mysqld 5.6.26) starting as process 17768 ...
2015-10-09 21:50:16 17768 [Note] Plugin 'FEDERATED' is disabled.
2015-10-09 21:50:16 17768 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-09 21:50:16 17768 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-09 21:50:16 17768 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-09 21:50:16 17768 [Note] InnoDB: Memory barrier is not used
2015-10-09 21:50:16 17768 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-10-09 21:50:16 17768 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-09 21:50:16 17768 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-09 21:50:16 17768 [Note] InnoDB: Completed initialization of buffer pool
2015-10-09 21:50:16 17768 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-09 21:50:16 17768 [Note] InnoDB: 128 rollback segment(s) are active.
2015-10-09 21:50:16 17768 [Note] InnoDB: Waiting for purge to start
2015-10-09 21:50:16 17768 [Note] InnoDB: 5.6.26 started; log sequence number 1626007
/usr/local/libexec/mysqld: Too many arguments (first extra is 'Project.pid').
Use --verbose --help to get a list of available options
2015-10-09 21:50:16 17768 [ERROR] Aborting

2015-10-09 21:50:16 17768 [Note] Binlog end
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'partition'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'ARCHIVE'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_METRICS'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_CMPMEM'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_CMP'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_LOCKS'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'INNODB_TRX'
2015-10-09 21:50:16 17768 [Note] Shutting down plugin 'InnoDB'
2015-10-09 21:50:16 17768 [Note] InnoDB: FTS optimize thread exiting.
2015-10-09 21:50:16 17768 [Note] InnoDB: Starting shutdown...
2015-10-09 21:50:18 17768 [Note] InnoDB: Shutdown completed; log sequence number 1626017
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'BLACKHOLE'
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'MyISAM'
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'MEMORY'
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'CSV'
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'MRG_MYISAM'
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'sha256_password'
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'mysql_old_password'
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'mysql_native_password'
2015-10-09 21:50:18 17768 [Note] Shutting down plugin 'binlog'
2015-10-09 21:50:18 17768 [Note] /usr/local/libexec/mysqld: Shutdown complete

151009 21:50:18 mysqld_safe mysqld from pid file /var/db/mysql/Chyu ended

Can anybody tell me, what's the problem?
Thank you.
 
This particular line seems interesting.
Code:
/usr/local/libexec/mysqld: Too many arguments (first extra is 'Project.pid').
Use --verbose --help to get a list of available options

What does sysrc -a | grep mysql output? Have you made any modifications to /usr/local/etc/rc.d/mysql-server or set any port options or can I assume this is a default install from pkg install mysql56-server?
 
Hi, thanks you for your reply!
I did only this steps:
Code:
# cd /usr/ports/databases/mysql56-server
# make BUILD_OPTIMIZED=yes BUILD_STATIC=yes
# make WITH_XCHARSET=all install clean

ee /etc/rc.conf

Added
Code:
mysql_enable="YES"
on new line.
 
Can you test without the specialized options and see if that resolves the issue? There may be a bug with one of the non default options. If so and you can find which one it is a PR submission to https://bugs.FreeBSD.org/bugzilla/ would be extremely useful for the maintainer to know there are issues out out there.
 
I would recommend just doing pkg delete mysql56-server and pkg install mysql56-server to remove your locally compiled one and use the public package. If that works, then start to backtrack on what option is causing the issue.
 
You don't have a .pid file because MySQL isn't running. The file is created when MySQL starts. Did you modify /usr/local/etc/rc.d/mysql-server?
 
I'm really struggling to find the cause of these messages:
Code:
/usr/local/libexec/mysqld: Too many arguments (first extra is 'Project.pid').
Use --verbose --help to get a list of available options
And:
Code:
151009 21:50:18 mysqld_safe mysqld from pid file /var/db/mysql/Chyu ended
Both Project.pid and Chyu aren't normal and shouldn't appear.

Have another close look at your rc.conf. Make sure everything is correctly quoted, I've seen some really weird issues if you forget to close a quote.
 
Let me explain what is the problem.

You use and old MySQL Database, to and new MySQL database.
You overwrite files.

Just delete var/db/mysql, delete mysql folder and reboot FreeBSD and you will see MySQL running.

NEVER overwrite var/db/mysql/mysql/
 
Hello and thanks for all the replies!

Have another close look at your rc.conf. Make sure everything is correctly quoted, I've seen some really weird issues if you forget to close a quote.
rc.conf is set correctly:
Code:
hostname="Chyu Project"
ifconfig_re0="inet [IP] netmask [Netmask]"
defaultrouter="[IP]"
sshd_enable="YES"
ntpd_enable="YES"
mysql_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"

Let me explain what is the problem.

You use and old MySQL Database, to and new MySQL database.
You overwrite files.

Just delete var/db/mysql, delete mysql folder and reboot FreeBSD and you will see MySQL running.

NEVER overwrite var/db/mysql/mysql/
Okay, I deleted mysql folder in var/db/mysql/, rebooted server and MySQL is still not running.

.err file:
Code:
151015 14:58:32 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
2015-10-15 14:58:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-10-15 14:58:33 0 [Note] /usr/local/libexec/mysqld (mysqld 5.6.26) starting as process 736 ...
2015-10-15 14:58:33 736 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13 - Permission denied)
2015-10-15 14:58:33 736 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2015-10-15 14:58:33 736 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-15 14:58:33 736 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-15 14:58:33 736 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-15 14:58:33 736 [Note] InnoDB: Memory barrier is not used
2015-10-15 14:58:33 736 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-10-15 14:58:33 736 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-15 14:58:33 736 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-15 14:58:33 736 [Note] InnoDB: Completed initialization of buffer pool
2015-10-15 14:58:33 736 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-15 14:58:33 802807400  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_index_stats'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_index_stats"', ignored.
2015-10-15 14:58:33 802807400  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_table_stats'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_table_stats"', ignored.
2015-10-15 14:58:33 802807400  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_master_info'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_master_info"', ignored.
2015-10-15 14:58:33 802807400  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_relay_log_info'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_relay_log_info"', ignored.
2015-10-15 14:58:33 802807400  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_worker_info'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2015-10-15 14:58:33 736 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_worker_info"', ignored.
2015-10-15 14:58:33 736 [Note] InnoDB: 128 rollback segment(s) are active.
2015-10-15 14:58:33 736 [Note] InnoDB: Waiting for purge to start
2015-10-15 14:58:33 736 [Note] InnoDB: 5.6.26 started; log sequence number 1626514
/usr/local/libexec/mysqld: Too many arguments (first extra is 'Project.pid').
Use --verbose --help to get a list of available options
2015-10-15 14:58:33 736 [ERROR] Aborting

2015-10-15 14:58:33 736 [Note] Binlog end
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'partition'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_METRICS'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_CMPMEM'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_CMP'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_LOCKS'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'INNODB_TRX'
2015-10-15 14:58:33 736 [Note] Shutting down plugin 'InnoDB'
2015-10-15 14:58:33 736 [Note] InnoDB: FTS optimize thread exiting.
2015-10-15 14:58:33 736 [Note] InnoDB: Starting shutdown...
2015-10-15 14:58:34 736 [Note] InnoDB: Shutdown completed; log sequence number 1626524
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'BLACKHOLE'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'ARCHIVE'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'CSV'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'MyISAM'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'MEMORY'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'MRG_MYISAM'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'sha256_password'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'mysql_old_password'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'mysql_native_password'
2015-10-15 14:58:34 736 [Note] Shutting down plugin 'binlog'
2015-10-15 14:58:34 736 [Note] /usr/local/libexec/mysqld: Shutdown complete

151015 14:58:34 mysqld_safe mysqld from pid file /var/db/mysql/Chyu ended
 
Aha.. And it suddenly all starts to make sense.

Code:
hostname="Chyu Project"
The hostname cannot have a space in it. That's where the problem originates. Please set a proper hostname.
 
Back
Top