Home > OS >  Multi instance - MYSQL/PHPmyAdmin - WINDOWS Server
Multi instance - MYSQL/PHPmyAdmin - WINDOWS Server

Time:12-27

I have 2 Windows Server with Mysql/phpmyadmin. One is my current server with production, the other will be use to save and backup the production (With a replication D-1 and D-7)

There is no problem on my production.

On Replication, i need to bind multiple adress in my.ini When i've installed 2 instances of Mysql, i've tried 2 ways to separate the instances.

I change the port without binding ip, and it works.

If i put bind-address, i've got an error.

My services are UP and works I already put the second IP address on the Ethernet Advanced TCP/IP configuration.

I'm blocked cause i don't know why the binding address didn't work

Thank you !

I change the port without binding ip, and it works Connection on PHPmyadmin and MYSQL Command line

Ex my.ini D-1 :

[client]
no-beep

port=3306

[mysqld]
# The TCP/IP Port the MySQL Server will listen on


port=3306
# Path to installation directory. All paths are usually resolved relative to this.
basedir=C:\Program Files\MySQL\MySQL Server 8.0\

# Path to the database root
datadir=D:\MySQLDatafiles\ 

myd7.ini D-7 :

[client]
no-beep

port=3307

[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3307
# Path to installation directory. All paths are usually resolved relative to this.
basedir=C:\Program Files\MySQL\MySQL Server 8.0j4

# Path to the database root
datadir=D:\MySQLDatafilesJ4

But when i put bind-address, Mysql Instance failed.

[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306
bind-address=111.11.11.111
# Path to installation directory. All paths are usually resolved relative to this.
basedir=C:\Program Files\MySQL\MySQL Server 8.0j4

[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306
bind-address=111.11.11.222
# Path to installation directory. All paths are usually resolved relative to this.
basedir=C:\Program Files\MySQL\MySQL Server 8.0j4

Here are the error : Connection on phpmyadmin

mysqli::real_connect(): (HY000/2002):
No connection could be established because the target computer expressly refused it

Connection with mysql.exe with command line :

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql 111.11.11.111 -u root -p
Enter password: *********
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql 111.11.11.222 -u root -p
Enter password: *********
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)

I'm available if you need more information !

CodePudding user response:

It looks like you are trying to bind a specific IP address to your MySQL instance, but it is not working. Here are some things you can try to troubleshoot the issue:

Check if the IP address you are binding to is correct and is the one that the server is using. You can use the ipconfig command to check the IP addresses of your server.

Make sure that the MySQL service is listening on the correct IP address. You can check this by looking at the bind-address parameter in the my.ini file.

Check if there are any firewall rules that are blocking the connection to the MySQL service. You can check the firewall rules by running the netsh advfirewall firewall show rule name=all command.

Make sure that the MySQL service is running and listening on the correct port. You can check the status of the service by running the netstat -aon command and looking for the MySQL service.

If you are still having trouble, you may want to try connecting to the MySQL service using the mysql command line tool with the -h flag to specify the IP address and the -P flag to specify the port. This will allow you to see any error messages that may be helpful in troubleshooting the issue.

CodePudding user response:

Thank you for your reply !

It works thank you, after many and many hours, i was blinded by it but i just need to specifiate Port with the right IP in the my.ini file !

111.11.11.111 with port 3306 and 111.11.11.222 with port 3307.

  • Related