简体   繁体   English

从其他计算机到Xampp服务器的MySQL连接? 错误1045

[英]Mysql connection from other computer to xampp server? Error 1045

There is much information about this error but seems nothing works. 有关此错误的信息很多,但似乎无济于事。

So I try to access to xampp mysql-server using the user root from local network. 因此,我尝试使用本地网络中的用户root访问xampp mysql服务器。

mysql -uroot -p -h 192.168.100.48 --port=3306 (connecting from other local computer to xampp server) mysql -uroot -p -h 192.168.100.48 --port = 3306(从其他本地计算机连接到xampp服务器)

But even I put right password (which I use for root) it not work. 但是,即使我输入了正确的密码(我用于root用户)也无法正常工作。 It works only if I log in using same computer where the server is running. 仅当我使用运行服务器的同一台计算机登录时,它才有效。 I can use other user which I have specified but not root user. 我可以使用我指定的其他用户,但不能使用root用户。 Why? 为什么?

So how to fix this problem and getting it working? 那么如何解决此问题并使它正常工作呢?

Does the root user have the correct permissions? root用户是否具有正确的权限?

Check the first duplicate link below for full answer - credit to Michael Berkowski: 查看下面的第一个重复链接以获取完整答案-归功于Michael Berkowski:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.%'
    IDENTIFIED BY 'some_characters'  
    WITH GRANT OPTION;
FLUSH PRIVILEGES;

Have you tried search SO first? 您是否先尝试过搜索? There are quite a few questions like this. 有很多这样的问题。

Possible duplicates: 可能重复:

How to grant remote access permissions to mysql server for user? 如何为用户授予对mysql服务器的远程访问权限?

Remote MySql connection from other server 来自其他服务器的远程MySql连接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM