两主机搭建MySQL主从复制后,show slave status显示:Last_IO_Er_MySQL
bitsCN.com
两主机搭建MySQL主从复制后,show slave status显示:Last_IO_Error: error connecting to master ……解决
两台主机A、B搭建mysql主从复制关系(A为master,B为slave)后,在slave上执行show slave status,结果中显示Last_IO_Error: error connecting to master 'replication@VMS00782:3306'……
首先查看B的错误日志文件,发现如下错误:
ERROR] Slave I/O: error connecting to master 'replication@VMS00782:3306' - retry-time: 60 retries: 2, Error_code: 1045
接着用perror查看上一部获得的错误代码:
perror 1045
输出:
MySQL error code 1045 (ER_ACCESS_DENIED_ERROR): Access denied for user '%-.48s'@'%-.64s' (using password: %s)
难道是复制用的账户存在问题??先在A上确认复制用户账户是否存在且是否赋了正确的权限
mysql> show grants for 'usvr_replication'@'%';+-----------------------------------------------------------------------------------------------------------------------------+| Grants for usvr_replication@% |+-----------------------------------------------------------------------------------------------------------------------------+| GRANT REPLICATION SLAVE ON *.* TO 'usvr_replication'@'%' IDENTIFIED BY PASSWORD '*F4039654D0AFD80BB0A7775938EFD47ACB809529' |+-----------------------------------------------------------------------------------------------------------------------------+1 row in set (0.00 sec)
发现没有问题!
然后,试着从B使用该账户连接至A:
mysql -uusvr_replication -h 192.168.83.35 -p -P55944
输入设置的密码后回车,没连上!!!再次输入,还没连上!!!
看来问题出在这儿了,仔细检查,原来是密码记错了!
试着用正确的密码重建复制关系:
在B上执行:
mysql>stop slave;mysql>researt slave;mysql>change master to master_host = 'VMS00782',master_user = 'replication',master_password = 'ReplPass@123456',master_port = 3306,master_log_file = 'VMS00782-bin.000001',master_log_pos = 120;mysql>start slave;mysql>show slave status;
一切正常!!!
需要注意的几个问题:
要在change master to语句的master_password部分使用原始的密码而非散列过的密码。
注意在第一时间查看错误日志文件,可使用perror工具根据错误代码查看具体的错误。
另外几个常见问题:
mysql无法启动:先看错误日志文件中提示的错误,依据错误找原因;查看配置文件中数据目录等配置是否正确;检查MySQL相关目录属主和属组是否正确;查看是否有之前未被正确关闭的mysqld进程仍在运行。
mysql无法连接:先看mysqld进程是否正确启动了;再看提供的连接串是否争取无误。
bitsCN.com
Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The relationship between the host's domain name and the host's IP address is: one IP address corresponds to multiple domain names. The IP address uses a digital form to identify the host in the computer network, and the domain name uses a character form to identify the host in the computer network. In the Internet, one domain name can correspond to one IP address, but one IP address can be corresponding to multiple domain names.

According to news from this site on July 23, Lenovo’s YOGA Portal high-performance desktop computer, which has been exposed for a long time, is now confirmed to be officially released at ChinaJoy in Shanghai on July 27. It is claimed to be a mini host designed for professional AI creation. It is a performance master and an expert in AI creation of 3D digital people. The AI virtual background is based on the on-site pictures provided by our friend @yuP in Shanghai. The volume of this small host is only 3.7L. It is made of anodized aluminum and is equipped with Intel Core. i7-14700 processor, equipped with 32GBDDR5 memory and 1TB solid state drive. YOGA Portal is both a host and an all-in-one AI creation machine. The high-performance host is combined with an algorithm-optimized camera to form an integrated solution. Just stand in front of the camera i.e.

According to news from this site on June 5, MSI participated in the 2024 Taipei International Computer Show and showcased a new flagship gaming computer called MEGVisionXAI. This game console is an extension of the existing Vision series and uses a very eye-catching surround glass design, with internal components clearly visible. The most attractive part is that the front of the host is equipped with an oversized touch screen. MSI staff said that it can synchronize MSI’s exclusive AI applications to further enhance various AI functions. The relevant pictures attached to this site are as follows: MSI has not yet explained more details. From the pictures shared, you can see that a local AI chatbot is running on the screen. Users can interact with it and ask it to complete AI tasks and locate locally stored documents. wait. Source of the above picture:

The mysql host name refers to the name or IP address used to identify and access the mysql database server. When building and maintaining the mysql server, in order to remotely access the database on the server, the user needs to know the host name of the mysql server and ensure that the server has been correctly Configuration and firewall settings, using the correct connection string can connect and access the mysql server in the programming language.

This website reported on February 14th that Cooler Master had previously displayed a SneakerX shoe-shaped computer host, which imitated the appearance of sports shoes. The national bank price of the machine has now been released. This is a red and white sneaker PC host equipped with a mini-ITX motherboard, 850WSFX gold medal full-module power supply, 360 integrated water cooling, and a size of 650x306x348mm. This site found that the Chinese version of the machine is available in AMD and Intel versions: the AMD version is equipped with Ryzen 97950X3D processor + RX7900XTX graphics card, equipped with 64GBDDR56000MHz memory and 4TB PCIe4.0SSD, as well as Wi-Fi6E + Bluetooth 5.2 + wired network port . Intel

There are 10 ways to check the host name in Linux, which are: 1. Use hostnamectl; 2. Use hostname; 3. Use uname; 4. Use nmcli; 5. Use sysctl; 6. Use cat /etc/hostname; 7. Use cat /etc/hosts; 8. Through ProcFS; 9. Use nmtui; 10. View through /etc/sysconfig/network.

When installing a memory stick, if it is installed upside down, not only will it not fit in, but it may even cause the motherboard and CPU to burn out. So how do you install the memory stick in the computer host from the front to the back? In fact, in order to distinguish the front from the back, the memory stick will have an asymmetrical one. slot. How to install the front and back of a memory stick in a computer host: Answer: Observe the notch on the gold finger of the memory stick, as shown in the picture. Align the notch with the protrusion on the motherboard memory socket and insert it. 1. In order to prevent users from confusing the front and back. 2. So the socket of the current memory module is asymmetrical. 3. It may appear in the left or right position. 4. When installing, we must first ensure that the interface of our memory module matches the motherboard. 5. After confirmation, find the memory slot on the motherboard and release the buckle at the location shown in the picture. 6. Break up

Hosting Configuration and Requirements Required for a WordPress Website Before building a WordPress website, it is very important to understand the hosting configuration and requirements required. With proper hosting configuration, the stability, security, and performance of your website can be ensured. This article will introduce the hosting configuration and requirements required for a WordPress website, and provide some specific code examples to help you understand better. 1. Server environment 1.1PHP version requirements WordPress officially recommends using PHP version 7.4 or newer
