dbTalk Databases Forums  

enabling remote access my.cnf, stops from pid file

comp.databases.mysql comp.databases.mysql


Discuss enabling remote access my.cnf, stops from pid file in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JRough
 
Posts: n/a

Default enabling remote access my.cnf, stops from pid file - 07-07-2010 , 11:43 PM






I changed my.cnf to allow remote access to mysql.
This is what I changed:
[mysqld]
user= root
pid-file = /var/run/mysqld.pid
socket = /tmp/mysql.sock
port = 3306
basedir = /usr
datadir = /usr/local/mysql-5.0.77-osx10.4-powerpc/data
tmpdir = /tmp
language = /usr/share/mysql/English
bind-address = www.myhost.com

I fired up mysql
and I get this error about the pid file:

Starting mysqld daemon with databases from /usr/local/mysql-5.0.77-
osx10.4-powerpc/data
STOPPING server from pid file /var/run/mysqld.pid
100707 21:31:25 mysqld ended

How can I fix this? There is a var/run directory. I didn't see a
mysql.pid.

The run directory has sh-3.2# sudo /usr/local/mysql/bin/mysqld_safe &
drwxrwxrwx 23 root daemon 782 Jul 7 21:36 run
thanks,

Reply With Quote
  #2  
Old   
Bodo
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-08-2010 , 02:40 AM






Hi,

this is my /private/etc/my.cnf
mysql is mysql-5.5.0-m2-osx10.5-x86 on a 10.5.6 Intel iMac24

# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only
used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is
/Applications/xampp/xamppfiles/var/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
password = xxxxxxxxxx
port = 3306
#socket = /Applications/xampp/xamppfiles/var/mysql/mysql.sock
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

# Don't listen on a TCP/IP port at all. This can be a security
enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named
pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1

#lower_case_table_names=1

# Uncomment the following if you want to log updates
#log-bin=mysql-bin

# Uncomment the following if you are NOT using BDB tables
#skip-bdb

# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /usr/local/mysql/data
innodb_data_file_path = ibdata1:10000M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/data/
##innodb_log_arch_dir = /usr/local/mysql/data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 160M
innodb_buffer_pool_size = 500M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 40M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 0
innodb_lock_wait_timeout = 50

set-variable=long_query_time=1
#log-slow-queries=/var/log/mysql/log-slow-queries.log
log-slow-queries=/usr/local/mysql/data/log-slow-queries.log

[mysqldump]
quick

================================================== =========

hth,

Bodo

Reply With Quote
  #3  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-08-2010 , 02:45 AM



JRough <jlrough (AT) yahoo (DOT) com> wrote:
Quote:
I changed my.cnf to allow remote access to mysql.
This is what I changed:
[mysqld]
user= root
pid-file = /var/run/mysqld.pid
socket = /tmp/mysql.sock
port = 3306
basedir = /usr
datadir = /usr/local/mysql-5.0.77-osx10.4-powerpc/data
tmpdir = /tmp
language = /usr/share/mysql/English

bind-address = www.myhost.com
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is normally not needed, only when you have a machine with multiple
network interface *and* want to constrain mysqld to only one interface.
Still in most cases its better to let mysqld bind to all interfaces and
then use a network filter (aka firewall) to close specific routes.

Quote:
I fired up mysql
and I get this error about the pid file:

Starting mysqld daemon with databases from /usr/local/mysql-5.0.77-
osx10.4-powerpc/data
STOPPING server from pid file /var/run/mysqld.pid
100707 21:31:25 mysqld ended

How can I fix this?
This is not an "error about the pid file". The message says that the
server was started and immediately stopped. In such cases you should
look into the server error log for the reason.

In this special case it's easy: --bind-address requires an IP address
in dots-and-numbers format. See:

http://dev.mysql.com/doc/refman/5.0/...d_bind-address


XL

Reply With Quote
  #4  
Old   
JRough
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-09-2010 , 12:40 AM



On Jul 8, 12:45*am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
Quote:
JRough <jlro... (AT) yahoo (DOT) com> wrote:
I changed my.cnf to allow remote access to mysql.
This is what I changed:
[mysqld]
user= root
pid-file = /var/run/mysqld.pid
socket = /tmp/mysql.sock
port = 3306
basedir = /usr
datadir = /usr/local/mysql-5.0.77-osx10.4-powerpc/data
tmpdir = /tmp
language = /usr/share/mysql/English
bind-address =www.myhost.com

* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is normally not needed, only when you have a machine with multiple
network interface *and* want to constrain mysqld to only one interface.
Still in most cases its better to let mysqld bind to all interfaces and
then use a network filter (aka firewall) to close specific routes.

I fired up mysql
and I get this error about the pid file:

Starting mysqld daemon with databases from /usr/local/mysql-5.0.77-
osx10.4-powerpc/data
STOPPING server from pid file /var/run/mysqld.pid
100707 21:31:25 *mysqld ended

How can I fix this?

This is not an "error about the pid file". The message says that the
server was started and immediately stopped. In such cases you should
look into the server error log for the reason.

In this special case it's easy: --bind-address requires an IP address
in dots-and-numbers format. See:

http://dev.mysql.com/doc/refman/5.0/...tml#option_mys...

XL
I did find the server error log file. I changed the IP to the number
from the hostname and found the error log which has the IP number on
it as part of the filename.
This is the logfile message:
100708 22:27:19 mysqld started
100708 22:27:19 [ERROR] Can't find messagefile '/usr/share/mysql/
English/errmsg.sys'
100708 22:27:19 [ERROR] Aborting

100708 22:27:19 mysqld ended
It is looking for the /usr/share/mysql/English/errmsg.sys
That directory was in my.cnf I guess it is the default. I do have a /
usr/share/ directory on this distro there is no /usr/share/mysql/
english So do I create an English/errmsg.sys directory in /usr/share
or is there a way to have Mysql create the errmsg.sys directory? Then
remote access should work.
Thanks,

Reply With Quote
  #5  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-09-2010 , 05:46 AM



JRough <jlrough (AT) yahoo (DOT) com> wrote:
Quote:
On Jul 8, 12:45=A0am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
JRough <jlro... (AT) yahoo (DOT) com> wrote:

I changed my.cnf to allow remote access to mysql.
This is what I changed:
[mysqld]
user= root
pid-file = /var/run/mysqld.pid
socket = /tmp/mysql.sock
port = 3306
basedir = /usr
datadir = /usr/local/mysql-5.0.77-osx10.4-powerpc/data
tmpdir = /tmp
language = /usr/share/mysql/English
bind-address =www.myhost.com

This is the logfile message:
100708 22:27:19 mysqld started
100708 22:27:19 [ERROR] Can't find messagefile '/usr/share/mysql/
English/errmsg.sys'
100708 22:27:19 [ERROR] Aborting
100708 22:27:19 mysqld ended
Pretty clear error message.

Quote:
It is looking for the /usr/share/mysql/English/errmsg.sys
Yes. And it does so because you have

Quote:
language = /usr/share/mysql/English
in your my.cnf. This is wrong. See

http://dev.mysql.com/doc/refman/5.0/...-language.html

Also English is the default, so there is no need to set it explicitly.
And there is another wrong config entry:

Quote:
basedir = /usr
The basedir should point to the installation base directory. Looks
like this is

/usr/local/mysql-5.0.77-osx10.4-powerpc

in your case, not /usr


XL

Reply With Quote
  #6  
Old   
JRough
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-09-2010 , 12:10 PM



On Jul 9, 3:46*am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
Quote:
JRough <jlro... (AT) yahoo (DOT) com> wrote:
On Jul 8, 12:45=A0am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
JRough <jlro... (AT) yahoo (DOT) com> wrote:
I changed my.cnf to allow remote access to mysql.
This is what I changed:
[mysqld]
user= root
pid-file = /var/run/mysqld.pid
socket = /tmp/mysql.sock
port = 3306
basedir = /usr
datadir = /usr/local/mysql-5.0.77-osx10.4-powerpc/data
tmpdir = /tmp
language = /usr/share/mysql/English
bind-address =www.myhost.com
This is the logfile message:
100708 22:27:19 *mysqld started
100708 22:27:19 [ERROR] Can't find messagefile '/usr/share/mysql/
English/errmsg.sys'
100708 22:27:19 [ERROR] Aborting
100708 22:27:19 *mysqld ended

Pretty clear error message.

It is looking for the /usr/share/mysql/English/errmsg.sys

Yes. And it does so because you have

language = /usr/share/mysql/English

in your my.cnf. This is wrong. See

http://dev.mysql.com/doc/refman/5.0/...-language.html

Also English is the default, so there is no need to set it explicitly.
And there is another wrong config entry:

basedir = /usr

The basedir should point to the installation base directory. Looks
like this is

/usr/local/mysql-5.0.77-osx10.4-powerpc

in your case, not /usr

XL
Thanks, made those changes and it started up. It is getting closer.
I can't connect via MySQL Administrator using the root login.
I telneted to the server and this is what I got:
adsl-99-157-73-33:~ jr$ telnet 99.157.73.33 port:3306
99.157.73.33: nodename nor servname provided, or not known
adsl-99-157-73-33:~ jr$

I have the port opened up.
Is it that or permissions issue?
thanks,

Reply With Quote
  #7  
Old   
Lennart Jonsson
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-09-2010 , 12:19 PM



On 2010-07-09 19:10, JRough wrote:
[...]
Quote:
adsl-99-157-73-33:~ jr$ telnet 99.157.73.33 port:3306
This syntax may hold for your version of telnet, but I haven't seen it
before. In the versions of telnet that I have used the syntax would be:

telnet 99.157.73.33 3306

/Lennart

[...]

Reply With Quote
  #8  
Old   
JRough
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-09-2010 , 02:52 PM



On Jul 9, 10:19*am, Lennart Jonsson <erik.lennart.jons... (AT) gmail (DOT) com>
wrote:
Quote:
On 2010-07-09 19:10, JRough wrote:
[...]

adsl-99-157-73-33:~ jr$ telnet 99.157.73.33 port:3306

This syntax may hold for your version of telnet, but I haven't seen it
before. In the versions of telnet that I have used the syntax would be:

telnet 99.157.73.33 3306

/Lennart

[...]
No it is still UNIX, my mistake, I tried it your way, at least I got a
response message.
it tried for a time and then timed out. so I don't know what the issue
is now.

Reply With Quote
  #9  
Old   
JRough
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-09-2010 , 02:55 PM



On Jul 9, 10:19*am, Lennart Jonsson <erik.lennart.jons... (AT) gmail (DOT) com>
wrote:
Quote:
On 2010-07-09 19:10, JRough wrote:
[...]

adsl-99-157-73-33:~ jr$ telnet 99.157.73.33 port:3306

This syntax may hold for your version of telnet, but I haven't seen it
before. In the versions of telnet that I have used the syntax would be:

telnet 99.157.73.33 3306

/Lennart

[...]
actually it said "Unable to connect to remote host".

Reply With Quote
  #10  
Old   
Doug Miller
 
Posts: n/a

Default Re: enabling remote access my.cnf, stops from pid file - 07-09-2010 , 04:50 PM



In article <8778dc14-8033-4956-a73b-7f6fd070577d (AT) u38g2000prh (DOT) googlegroups.com>, JRough <jlrough (AT) yahoo (DOT) com> wrote:
Quote:
On Jul 9, 10:19=A0am, Lennart Jonsson <erik.lennart.jons... (AT) gmail (DOT) com
wrote:
On 2010-07-09 19:10, JRough wrote:
[...]

adsl-99-157-73-33:~ jr$ telnet 99.157.73.33 port:3306

This syntax may hold for your version of telnet, but I haven't seen it
before. In the versions of telnet that I have used the syntax would be:

telnet 99.157.73.33 3306

/Lennart

[...]

No it is still UNIX, my mistake, I tried it your way, at least I got a
response message.
it tried for a time and then timed out. so I don't know what the issue
is now.
Probably a router or firewall issue -- something preventing the traffic from
coming through.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.