How to make mySQL database at my local accessible from different machines?

怎甘沉沦 提交于 2019-12-01 11:54:11

STEP 1: Check IP connectivity

By default it only allows connections from 127.0.0.1. Are you using windows or linux?

Open my.cnf and change bind address to your network IP.

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/English
bind-address    = 127.0.0.1

More info can easily be found in google. Check this.

STEP 2: Check your firewall

Also, as commented by @Leandro, check your windows firewall settings to allow connections to happen.

One easy way to test it is to make a telnet from the client machine to your MySQL network ip, port 3306 and see if connects or get blocked.

STEP 3: Check mysql user permissions

Once you have IP connectivity, the user that your alumni are using should have log in permissions from any host. For example if they use root you have to run a query like this:

update user set host=’%’ where user=’root’ and host=’ubuntuserv’;

You can see more info here.

Ask them to use phpMyAdmin to access your database over you IP address. Also put your Apache server online.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!