php - lnmp1.4, mysql cannot connect remotely
学习ing
学习ing 2017-06-29 10:08:49
0
1
934

1. One-click installation package lnmp1.4 PHP development environment built by vagrant. After local installation, there are no tools to remotely connect to the database.

2. Error message: Cant't connect to MySQL server on '192.168.33.10'(10060)

3. Try to solve:

mysql permission problem:
use mysql;

CREATE USER vagrant IDENTIFIED BY 'vagrant';

GRANT ALL ON *.* TO vagrant@'%'  IDENTIFIED BY 'vagrant' WITH GRANT OPTION;

After modifying the permissions, it is invalid or an error is reported

iptables port problem:

Modify as shown above and the problem is solved.
Self-question and answer for future reference, it is recommended to use administrator.php as a backup when the database cannot be connected remotely

学习ing
学习ing

reply all(1)
给我你的怀抱

When I saw Cant't connect to MySQL server on '192.168.33.10'(10060), my first reaction was account permissions
After seeing the questioner troubleshooting this reason, I thought that Linux might have a port that is not open
Then There will be no more after watching this

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template