2 mysqld instances

2008-03-20 Thread Edson Noboru Yamada
Hi,
I have a single machine with 2 mysql instances running. One of them was
started like this:

/home/y/libexec/mysqld --basedir=/home/mysql --datadir=/var/mysql/data
--pid-file=/var/mysql/mysqld.pid --port=3306 --socket=/tmp/mysql.sock


and, the other one, like this:

/home/y/libexec/mysqld --defaults-extra-file=/var/app/data/my.cnf
--basedir=/home/mysql --datadir=/var/app/data --user=mysql
--pid-file=/var/run/mysqld.pid --port=3382 --socket=/tmp/app_mysql.sock


However, when I try to access the second instance using mysql -u root
-P3382, I land on the first instance. Why?

The only way I could get to that instance is by using mysql
--socket=/tmp/app_mysql.sock  -u root.

Thank you.


Re: 2 mysqld instances

2008-03-20 Thread Dan Nelson
In the last episode (Mar 20), Edson Noboru Yamada said:
 I have a single machine with 2 mysql instances running. One of them
 was started like this:
 
 /home/y/libexec/mysqld --basedir=/home/mysql --datadir=/var/mysql/data 
 --pid-file=/var/mysql/mysqld.pid --port=3306 --socket=/tmp/mysql.sock
 
 and, the other one, like this:
 
 /home/y/libexec/mysqld --defaults-extra-file=/var/app/data/my.cnf 
 --basedir=/home/mysql --datadir=/var/app/data --user=mysql 
 --pid-file=/var/run/mysqld.pid --port=3382 --socket=/tmp/app_mysql.sock
 
 However, when I try to access the second instance using mysql -u root
 -P3382, I land on the first instance. Why?

-P is only used when connecting to non-localhost addresses.  Try adding
-h 127.0.0.1 to your commandline.

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: 2 mysqld instances

2008-03-20 Thread Edson Noboru Yamada
On Thu, Mar 20, 2008 at 2:53 PM, Dan Nelson [EMAIL PROTECTED] wrote:



 -P is only used when connecting to non-localhost addresses.  Try adding
 -h 127.0.0.1 to your commandline.


It worked! Thank you!


Re: 2 mysqld instances

2008-03-20 Thread Paul DuBois

At 3:25 PM -0300 3/20/08, Edson Noboru Yamada wrote:

On Thu, Mar 20, 2008 at 2:53 PM, Dan Nelson [EMAIL PROTECTED] wrote:




 -P is only used when connecting to non-localhost addresses.  Try adding
 -h 127.0.0.1 to your commandline.



It worked! Thank you!


You can also force a TCP/IP connection, even for localhost, with
--protocol=tcp

http://dev.mysql.com/doc/refman/5.0/en/invoking-programs.html

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]