search

Home  >  Q&A  >  body text

php - lnmp1.4, mysql cannot connect remotely

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学习ing2789 days ago982

reply all(1)I'll reply

  • 给我你的怀抱

    给我你的怀抱2017-06-29 10:10:49

    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

    reply
    0
  • Cancelreply