# error 2002 can't connect to local mysql server through socket



## enweniwe (Aug 4, 2010)

After installing mysql5.5.5 on freebsd8.0 I try the following
`# mysql -u root`
I get 

```
error 2002 can't connect to local mysql server through socket '/tmp/mysql.sock'
```
Please I need help to go ahead.


----------



## SirDice (Aug 4, 2010)

It's not running.


----------



## enweniwe (Aug 4, 2010)

how do I get it to run?


----------



## SirDice (Aug 4, 2010)

Add to /etc/rc.conf:

```
mysql_enable="YES"
```

And start it `# /usr/local/etc/rc.d/mysql-server.sh start` or reboot.


----------



## enweniwe (Aug 4, 2010)

I have added the line 

```
mysql_enable="YES"
```
 in /etc/rc.conf and rebooted the server and I am getting the same error still.
I try running `/usr/local/etc/rc.d/mysql-server.sh start` but I got error

```
/usr/local/etc/rc.d/mysql-server.sh: command not found
```
but when I tried [cmd=]/usr/local/etc/rc.d/mysql-server[/cmd] start it showed
starting mysql.
I do not know what is wrong here


----------



## SirDice (Aug 4, 2010)

Ok. I did it from the top of my head. Read the rc script, it will show what exactly to set in rc.conf to enable this particular version.


----------



## DutchDaemon (Aug 4, 2010)

The .sh extension of rc.d scripts has long been a thing of the past, no?


----------



## pbd (Aug 4, 2010)

Look at your my.cnf where your socket file is configured (line "socket = ..."). If it's not /tmp/mysql.sock use "-S" parameter. For example:


```
msql -u root -S /var/db/mysql/mysql.sock
```

If it should be at for example /tmp/mysql.sock but it's not after you started the deamon, look in /var/db/mysql/_MACHINEHOSTNAME_.err by default for errors.


----------



## enweniwe (Aug 4, 2010)

I am sorry to ask this question but where can I locate rc script?


----------



## pbd (Aug 4, 2010)

enweniwe said:
			
		

> I am sorry to ask this question but where can I locate rc script?



/usr/local/etc/rc.d/


----------



## enweniwe (Aug 4, 2010)

`more /var/db/mysql/MACHINEHOSTNAME.err` does not produce anything to assist in troubleshooting the problem.


----------



## pbd (Aug 4, 2010)

enweniwe said:
			
		

> more /var/db/mysql/MACHINEHOSTNAME.err does not produce anythin to assist in troubleshooting the problem.



You must replace "MACHINEHOSTNAME" with your hostname. Run command

`hostname`

to see what it is, if you don't know. Or just search any *.err in /var/db/mysql.


----------



## SirDice (Aug 4, 2010)

DutchDaemon said:
			
		

> The .sh extension of rc.d scripts has long been a thing of the past, no?



Strictly speaking it's not needed anymore, no. But this lead me to think it wasn't:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/mysql55-server/files/


----------



## enweniwe (Aug 4, 2010)

thanks pbd. This are my /etc/rc.conf

```
# -- sysinstall generated deltas -- # Wed Jul 28 15:15:42 2010
# Created: Wed Jul 28 15:15:42 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="192.168.15.220"
gateway_enable="YES"
hostname="machinehostname"
ifconfig_bge0="DHCP"
keymap="us.iso"
# -- sysinstall generated deltas -- # Thu Jul 29 07:56:00 2010
sendmail_enable="YES"
devfs_system_ruleset="localrules"
mysql_enable="YES"
mysql_enable="YES"
# -- sysinstall generated deltas -- # Tue Aug  3 10:29:55 2010
hostname="machinehostname"
# -- sysinstall generated deltas -- # Tue Aug  3 14:24:44 2010
defaultrouter="192.168.15.220"
hostname="machinehostname"
# -- sysinstall generated deltas -- # Tue Aug  3 16:03:53 2010
ifconfig_bge0="DHCP"
hostname="machinehostname"
```

and /usr/local/etc/rc.d/mysql-server below


```
#!/bin/sh
#
# $FreeBSD: ports/databases/mysql55-server/files/mysql-server.sh.in,v 1.8 2010/03/27 00:12:47 dougb Exp $
#

# PROVIDE: mysql
# REQUIRE: LOGIN
# KEYWORD: shutdown

#
# Add the following line to /etc/rc.conf to enable mysql:
# mysql_enable (bool):	Set to "NO" by default.
#			Set it to "YES" to enable MySQL.
# mysql_limits (bool):	Set to "NO" by default.
#			Set it to yes to run `limits -e -U mysql`
#			just before mysql starts.
# mysql_dbdir (str):	Default to "/var/db/mysql"
#			Base database directory.
# mysql_args (str):	Custom additional arguments to be passed
#			to mysqld_safe (default empty).
#

. /etc/rc.subr

name="mysql"
rcvar=`set_rcvar`

load_rc_config $name

: ${mysql_enable="NO"}
: ${mysql_limits="NO"}
: ${mysql_dbdir="/var/db/mysql"}
: ${mysql_args=""}

mysql_user="mysql"
mysql_limits_args="-e -U ${mysql_user}"
pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
command="/usr/local/bin/mysqld_safe"
command_args="--defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null 2>&1 &"
procname="/usr/local/libexec/mysqld"
start_precmd="${name}_prestart"
start_postcmd="${name}_poststart"
mysql_install_db="/usr/local/bin/mysql_install_db"
mysql_install_db_args="--ldata=${mysql_dbdir}"

mysql_create_auth_tables()
{
	eval $mysql_install_db $mysql_install_db_args >/dev/null 2>/dev/null
        [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir}
}

mysql_prestart()
{
	if [ ! -d "${mysql_dbdir}/mysql/." ]; then
		mysql_create_auth_tables || return 1
	fi
	if checkyesno mysql_limits; then
		eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null
	else
		return 0
	fi
}

mysql_poststart()
{
	local timeout=15
	while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do
		timeout=$(( timeout - 1 ))
		sleep 1
	done
	return 0
}

run_rc_command "$1"
```


----------



## DutchDaemon (Aug 4, 2010)

Use 
	
	



```
tags for output, not [quote] tags! 
[url=http://forums.freebsd.org/showthread.php?t=8816]http://forums.freebsd.org/showthread.php?t=8816[/url]
```


----------



## enweniwe (Aug 4, 2010)

Find below /var/db/mysql/*.err 

```
100804 12:19:45 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 12:19:45 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 12:19:45 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
100804 12:19:45  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
100804 12:19:45  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...
100804 12:19:45  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
100804 12:19:46 InnoDB 1.1.1 started; log sequence number 0
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 12:19:46 [ERROR] Aborting

100804 12:19:46  InnoDB: Starting shutdown...
100804 12:19:51  InnoDB: Shutdown completed; log sequence number 1595675
100804 12:19:51 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 12:19:51 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 14:01:04 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 14:01:05 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 14:01:05 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 14:01:05  InnoDB: highest supported file format is Barracuda.
100804 14:01:06 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 14:01:06 [ERROR] Aborting

100804 14:01:06  InnoDB: Starting shutdown...
100804 14:01:11  InnoDB: Shutdown completed; log sequence number 1595675
100804 14:01:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 14:01:11 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 14:04:49 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 14:04:49 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 14:04:49 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 14:04:49  InnoDB: highest supported file format is Barracuda.
100804 14:04:49 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 14:04:49 [ERROR] Aborting

100804 14:04:49  InnoDB: Starting shutdown...
100804 14:04:54  InnoDB: Shutdown completed; log sequence number 1595675
100804 14:04:54 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 14:04:54 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 15:05:05 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 15:05:05 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 15:05:05 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 15:05:05  InnoDB: highest supported file format is Barracuda.
100804 15:05:05 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 15:05:05 [ERROR] Aborting

100804 15:05:05  InnoDB: Starting shutdown...
100804 15:05:11  InnoDB: Shutdown completed; log sequence number 1595675
100804 15:05:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 15:05:11 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
```


----------



## SirDice (Aug 4, 2010)

It seems the rc script starts mysql with a few options that aren't supported anymore (like --pid-file). This should be reported to the port's maintainer.

Is there any particular reason you want MySQL 5.5.x? 
I stongly recommend installing either 5.0.x or 5.1.x. instead. A lot of ports don't support 5.5.x.


----------



## enweniwe (Aug 4, 2010)

sirdice thanks. i will rm pkg and install 5.1.x and get back


----------



## enweniwe (Aug 4, 2010)

I have installed mysql51-server but I am still having the same issue
I tried locating with

```
find / -name my.cnf 
find / -name mysql.sock
```
and they are not in the system. Please help.


----------



## enweniwe (Aug 4, 2010)

I have installed mysql51-server but I am still having the same issue
I tried locating with

```
find / -name my.cnf 
find / -name mysql.sock
```
and they are not in the system. Please help


----------



## SirDice (Aug 4, 2010)

There is no my.cnf by default. And not having a mysql.sock means the server isn't running.


----------



## pbd (Aug 4, 2010)

Please post again /var/db/mysql/*.err.


----------



## SirDice (Aug 5, 2010)

You never started the server!

`# /usr/local/etc/rc.d/mysql start`


----------



## pbd (Aug 5, 2010)

enweniwe said:
			
		

> /var/db/mysql/*.err
> 
> ```
> 100804 12:19:45 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
> ...



Is this the new .err file after you installed mysql *5.1*? It looks like the old one from 5.5.

What version do you use?

`# /usr/local/libexec/mysqld --version`


----------



## SirDice (Aug 5, 2010)

pbd said:
			
		

> Is this the new .err file after you installed mysql *5.1*? It looks like the old one from 5.5.


It's the old one. Look at the date/time stamp. Compare that with the previously posted .err file.


----------



## enweniwe (Aug 5, 2010)

```
100804 12:19:45 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 12:19:45 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 12:19:45 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
100804 12:19:45  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
100804 12:19:45  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...
100804 12:19:45  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
100804 12:19:46 InnoDB 1.1.1 started; log sequence number 0
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 12:19:46 [ERROR] Aborting

100804 12:19:46  InnoDB: Starting shutdown...
100804 12:19:51  InnoDB: Shutdown completed; log sequence number 1595675
100804 12:19:51 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 12:19:51 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 14:01:04 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 14:01:05 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 14:01:05 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 14:01:05  InnoDB: highest supported file format is Barracuda.
100804 14:01:06 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 14:01:06 [ERROR] Aborting

100804 14:01:06  InnoDB: Starting shutdown...
100804 14:01:11  InnoDB: Shutdown completed; log sequence number 1595675
100804 14:01:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 14:01:11 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 14:04:49 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 14:04:49 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 14:04:49 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 14:04:49  InnoDB: highest supported file format is Barracuda.
100804 14:04:49 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 14:04:49 [ERROR] Aborting

100804 14:04:49  InnoDB: Starting shutdown...
100804 14:04:54  InnoDB: Shutdown completed; log sequence number 1595675
100804 14:04:54 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 14:04:54 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 15:05:05 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 15:05:05 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 15:05:05 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 15:05:05  InnoDB: highest supported file format is Barracuda.
100804 15:05:05 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 15:05:05 [ERROR] Aborting

100804 15:05:05  InnoDB: Starting shutdown...
100804 15:05:11  InnoDB: Shutdown completed; log sequence number 1595675
100804 15:05:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 15:05:11 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100805 12:32:37 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100805 12:32:37 [Note] Plugin 'FEDERATED' is disabled.
100805 12:32:37  InnoDB: Started; log sequence number 0 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100805 12:32:37 [ERROR] Aborting

100805 12:32:37  InnoDB: Starting shutdown...
100805 12:32:43  InnoDB: Shutdown completed; log sequence number 0 1595675
100805 12:32:43 [Note] /usr/local/libexec/mysqld: Shutdown complete

100805 12:32:43 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
```


```
/usr/local/libexec/mysqld --version Ver 5.1.48 for portbld-freebsd8.0 on i386 (FreeBSD port: mysql-server-5.1.48)
```


----------



## enweniwe (Aug 5, 2010)

```
100804 12:19:45 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 12:19:45 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 12:19:45 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
100804 12:19:45  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
100804 12:19:45  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...
100804 12:19:45  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
100804 12:19:46 InnoDB 1.1.1 started; log sequence number 0
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 12:19:46 [ERROR] Aborting

100804 12:19:46  InnoDB: Starting shutdown...
100804 12:19:51  InnoDB: Shutdown completed; log sequence number 1595675
100804 12:19:51 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 12:19:51 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 14:01:04 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 14:01:05 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 14:01:05 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 14:01:05  InnoDB: highest supported file format is Barracuda.
100804 14:01:06 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 14:01:06 [ERROR] Aborting

100804 14:01:06  InnoDB: Starting shutdown...
100804 14:01:11  InnoDB: Shutdown completed; log sequence number 1595675
100804 14:01:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 14:01:11 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 14:04:49 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 14:04:49 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 14:04:49 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 14:04:49  InnoDB: highest supported file format is Barracuda.
100804 14:04:49 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 14:04:49 [ERROR] Aborting

100804 14:04:49  InnoDB: Starting shutdown...
100804 14:04:54  InnoDB: Shutdown completed; log sequence number 1595675
100804 14:04:54 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 14:04:54 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100804 15:05:05 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100804 15:05:05 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100804 15:05:05 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100804 15:05:05  InnoDB: highest supported file format is Barracuda.
100804 15:05:05 InnoDB 1.1.1 started; log sequence number 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100804 15:05:05 [ERROR] Aborting

100804 15:05:05  InnoDB: Starting shutdown...
100804 15:05:11  InnoDB: Shutdown completed; log sequence number 1595675
100804 15:05:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

100804 15:05:11 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
100805 12:32:37 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
100805 12:32:37 [Note] Plugin 'FEDERATED' is disabled.
100805 12:32:37  InnoDB: Started; log sequence number 0 1595675
/usr/local/libexec/mysqld: Too many arguments (first extra is '.pid').
Use --verbose --help to get a list of available options
100805 12:32:37 [ERROR] Aborting

100805 12:32:37  InnoDB: Starting shutdown...
100805 12:32:43  InnoDB: Shutdown completed; log sequence number 0 1595675
100805 12:32:43 [Note] /usr/local/libexec/mysqld: Shutdown complete

100805 12:32:43 mysqld_safe mysqld from pid file /var/db/mysql/machinehostname ended
```


----------



## SirDice (Aug 5, 2010)

Lets get drastical

`# rm -rf /var/db/mysql/*`

Remove everyting in /etc/rc.conf too, it's a mess.
Put this in:

```
hostname="machinehostname"
ifconfig_bge0="DHCP"
mysql_enable="YES"
```

Everything else is either on by default (so you don't need to set it) or is in there multiple times.

Reboot. After the reboot check if mysql is running: `$ pgrep -lf mysql`
If it isn't have a look at /var/db/mysql/`hostname`.err and/or /var/log/messages.


----------



## gilinko (Aug 5, 2010)

And do _not_, as you have done up until now, use _machinehostname_ as your hostname, but the actual hostname of you hardware.


----------



## enweniwe (Aug 5, 2010)

thanks guys. it is working now. I really appreciate you guys. you are great.


----------



## enweniwe (Aug 5, 2010)

sirDice you did the magic. thanks


----------



## aramis1960 (Jun 18, 2011)

Hi,

I got the same problem on Windows 7 64 bit. I tried to hack but no results. It took two weeks from my life. Truly fed up with Windows 7. Please, help me, guys. I got these results in the MySQL log:


```
110618 16:29:12 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
110618 16:29:12  InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
110618 16:29:13  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...
110618 16:29:13  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: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
110618 16:29:14  InnoDB: Started; log sequence number 0 0
110618 16:29:14 [Note] Event Scheduler: Loaded 0 events
110618 16:29:14 [Note] wampmysqld: ready for connections.
Version: '5.1.36-community-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
110618 16:36:42 [Note] wampmysqld: Normal shutdown

110618 16:36:42 [Note] Event Scheduler: Purging the queue. 0 events
110618 16:36:42  InnoDB: Starting shutdown...
110618 16:36:44  InnoDB: Shutdown completed; log sequence number 0 46409
110618 16:36:44 [Warning] Forcing shutdown of 1 plugins
110618 16:36:44 [Note] wampmysqld: Shutdown complete

110618 17:02:30 [Note] Plugin 'FEDERATED' is disabled.
110618 17:02:31  InnoDB: Started; log sequence number 0 46409
110618 17:02:31 [Note] Event Scheduler: Loaded 0 events
110618 17:02:31 [Note] wampmysqld: ready for connections.
Version: '5.1.36-community-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
```


----------



## aramis1960 (Jun 18, 2011)

Hi again, step by step help if it possible. Too angry to cope with lack of attention


----------

