List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:May 10 1999 12:27am
Subject:Re: mysql config & ISP
View as plain text  
At 3:00 PM -0700 5/9/1999, Brian Clarkson wrote:
>Help!  I'm trying to get a second mysqld running on an ISP's machine.
>I've read through the docs already (and I'm gonna dig again & see if I
>missed anything), but so far the docs point to using the configure
>script ([TMPDIR]/scripts/configure) to reset environment variables,
>etc.  The ISP has REMOVED the entire mysql directory and all that's left
>are the mysql executables (mysql, mysqladmin, mysql_install_db, etc).
>
>I don't know if i can just copy up my local versions and tweak them
>since I'm running a version older than they are (i have 3.21, they're
>running 3.22; don't see it making a big difference . . .)

To run a second server, you need to run it with different values than
the ISP's server for these things:

data directory
TCP/IP port number
UNIX socket

It's certainly easier if you can compile and install from source,
because that way you can configure your distribution to use defaults
that are different than the ones your ISP's distribution uses.

If you use the binaries the ISP already has installed, you'll need
to tell your server where your own data directory is,
and you'll need to tell all MySQL programs (including the server)
which port and socket to use for connections.

You can tell your server the data directory pathname using a
command line option when you start your server.  Let's suppose your
home directory is /u/users/tekshamn and you want the data directory
to be /u/users/tekshamn/mysql/data.  To tell the server this, pass
it a --datadir=/u/users/tekshamn/mysql/data.

To tell programs the TCP/IP port and/or UNIX socket, use --port=port_num
and --socket=/path/to/socket options on all programs.  This means
you'd start the server, e.g., like this:

mysqld --datadir=/u/users/tekshamn/mysql/data \
       --socket=/u/users/tekshamn/mysql/mysql.sock \
       --port=5000

(You don't have to use 5000; pick something not being used on your machine.
Might be a good idea to ask the ISP for a port number they don't care if you
use.)

To start clients, you must pass them a --socket or --port options like
the one you use to start the server.

Alternatively, you can set the MYSQL_TCP_PORT and MYSQL_UNIX_PORT
environment variables to the port number and socket name.  Any program
started in that environment won't need the --port or --socket options
on the command line.

Another alternative would be to define aliases for the mysql programs
so that they're automatically invoked with the proper --port or --socket
option.  E.g., for csh/tcsh, you can alias the mysql client like this:

alias mysql 'mysql --socket=/u/users/tekshamn/mysql/mysql.sock --port=5000'


Let's see, did I forget anything?

--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
mysql config & ISPBrian Clarkson10 May
  • Re: mysql config & ISPSasha Pachev10 May
    • MySQL daemon mysteriously dieing.James Tyson10 May
      • MySQL daemon mysteriously dieing.Michael Widenius11 May
        • Re: MySQL daemon mysteriously dieing.James Tyson12 May
  • Re: mysql config & ISPPaul DuBois10 May