Accesing XAMPP MySql Database from Another Computer

前端 未结 2 382
南旧
南旧 2020-12-10 07:39

So a friend of mine and I are using both xampp on ubuntu, if that helps, to connect between each other\'s website, We both created the same php file to connect, so we use de

相关标签:
2条回答
  • 2020-12-10 08:19

    Check you have enabled remote access to the MySQL server. Open the my.cnf file (probably found inside xampp/etc/), go to the [mysqld] section and add the following (using your own ip address instead of the example)

    bind-address=192.168.1.100
    

    If there is a line that says skip-networking, comment that out so it looks like this:

    # skip-networking
    

    then restart the MySQL server

    0 讨论(0)
  • 2020-12-10 08:19

    It looks like your MySQL database isn't allowing you to connect remotely with the credentials you provided. You will need to configure a remote user to connect. Try looking into MySQL Grants.

    For Example:

    GRANT SELECT, INSERT ON database.* TO 'someuser'@'somehost';
    
    0 讨论(0)
提交回复
热议问题