영문 매뉴얼에 명백히 나와 있군요.
하지만 전 영문을 정확히 해석할 능력이 없으니, 누가 영어 잘 하시는분 정확한 해석을 해서 올려주시면 도움이 많이 될 것 같네요.
저는 물론이고 이 게시판에 올라온 질문중 대부분을 해결 할 수 있겠는데요.
대충 내용은 두개 이상의 서버가 동시에 떠 있기때문이라는 군요.
즉, Mysql 을 한번 이상 설치한 경우가 해당 되는 듯 합니다.
shell> BINDIR/safe_mysqld &
If that command fails immediately with mysqld daemon ended then you can find some information in the file `mysql-data-directory/'hostname'.err'. The likely reason is that you already have another mysqld server running. See section 21.4 Running multiple MySQL servers on the same machine. (위 명령이 실패하고 데몬이 즉시 죽는 현상이 생길때 mysql-data-directory/'hostname'.err' 에서 정보를 얻을 수 있을 것이다. 이런 경우 아래 내용을 참조하라)
http://www.mysql.com/documentation/manual.php?section=Multiple_servers
21.4 Running multiple MySQL servers on the same machine
There are circumstances when you might want to run multiple servers on the same machine. For example, you might want to test a new MySQL release while leaving your existing production setup undisturbed. Or you might be an Internet service provider that wants to provide independent MySQL installations for different customers.
If you want to run multiple servers, the easiest way is to compile the servers with different TCP/IP ports and socket files so they are not both listening to the same TCP/IP port or socket file.
Assume an existing server is configured for the default port number and socket file. Then configure the new server with a configure command something like this:
shell> ./configure --with-tcp-port=port_number \r
--with-unix-socket=file_name \r
--prefix=/usr/local/mysql-3.22.9
Here port_number and file_name should be different than the default port number and socket file pathname, and the --prefix value should specify an installation directory different than the one under which the existing MySQL installation is located.
You can check the socket and port used by any currently-executing MySQL server with this command:
shell> mysqladmin -h hostname --port=port_number variables
If you have a MySQL server running on the port you used, you will get a list of some of the most important configurable variables in MySQL, including the socket name.
You should also edit the initialization script for your machine (probably `mysql.server') to start and kill multiple mysqld servers.
You don't have to recompile a new MySQL server just to start with a different port and socket. You can change the port and socket to be used by specifying them at runtime as options to safe_mysqld:
shell> /path/to/safe_mysqld --socket=file_name --port=port_number
If you run the new server on the same database directory as another server with logging enabled, you should also specify the name of the log files to safe_mysqld with --log and --log-update. Otherwise, both servers may be trying to write to the same log file.
Warning: Normally you should never have two servers that update data in the same database! If your OS doesn't support fault-free system locking, this may lead to unpleasant surprises!
If you want to use another database directory for the second server, you can use the --datadir=path option to safe_mysqld.
When you want to connect to a MySQL server that is running with a different port than the port that is compiled into your client, you can use one of the following methods:
Start the client with --host 'hostname' --port=port_numer or [--host localhost] --socket=file_name.
In your C or Perl programs, you can give the port and socket arguments when connecting to the MySQL server.
Set the MYSQL_UNIX_PORT and MYSQL_TCP_PORT environment variables to point to the Unix socket and TCP/IP port before you start your clients. If you normally use a specific socket or port, you should place commands to set these environment variables in your `.login' file. See section A Environment variables. See section 14.1 Overview of the different MySQL programs.
Specify the default socket and TCP/IP port in the `.my.cnf' file in your home directory. See section 4.15.5 Option files.
|