PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > 2 mysqld instances
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
2 mysqld instances

Réponse
 
LinkBack Outils de la discussion
Vieux 20/03/2008, 18h18   #1
Edson Noboru Yamada
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 2 mysqld instances

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.

  Réponse avec citation
Vieux 20/03/2008, 18h53   #2
Dan Nelson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: 2 mysqld instances

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
dnelson@allantgroup.com
  Réponse avec citation
Vieux 20/03/2008, 19h25   #3
Edson Noboru Yamada
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: 2 mysqld instances

On Thu, Mar 20, 2008 at 2:53 PM, Dan Nelson <dnelson@allantgroup.com> 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!

  Réponse avec citation
Vieux 20/03/2008, 19h35   #4
Paul DuBois
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: 2 mysqld instances

At 3:25 PM -0300 3/20/08, Edson Noboru Yamada wrote:
>On Thu, Mar 20, 2008 at 2:53 PM, Dan Nelson <dnelson@allantgroup.com> 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/...-programs.html

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h34.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10143 seconds with 12 queries