Solved

how to by shell connect to 2 mysql server in same server

Posted on 2008-11-01
2
240 Views
Last Modified: 2012-05-05
I have 2 mysql start in same server.
one to port 3306 and socket /tmp/mysql.sock
one to port 3308 and socket /tmp/mysql2.sock

I want can connect with script shell to mysql1 or mysql2

how to by shell connect to 2 mysql in same server ?
0
Comment
Question by:thierry91
2 Comments
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
ID: 22857059
You can use the --port command line parameter to specify what port to connect to, or --socket to specify the socket:

mysql --port=3308
mysql --socket=/tmp/mysql2.sock

To see all possible command line parameters, use:

mysql --help
0
 
LVL 1

Author Comment

by:thierry91
ID: 22857096
thank you,
mysql --port=3308   // not work

mysql --socket=/tmp/mysql2.sock   // work fine

cordially
thierry
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now