How to share the PHPmyadmin in LAN in Windows environment?
This may be the serverfault question. I am using XAMPP in my system.I want to access the PHPMyadmin from my network's another computer.How can I achieve this?
Update:
I want to access through my application also.So How can I connect in this
mysql_connect(path,'root','')
And also I have changed in Apache httpd.conf file like this
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,开发者_JAVA百科deny
Allow from all
</Directory>
I have found an answer to the oposite problem, deny access in lan and inverted the procedure to solve the same problem, it works for me. answer oposite.
EDIT Here are the steps: First open httpd-xampp.conf, Usually it's located in: c:\xampp\apache\conf\extra\httpd-xampp.conf then at the bottom of the file change the default value: Usually like this:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
to this:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Lastly reestart apache.
I think that doing that we are allowing a range of local ip's to acces phpmyadmin through some kind of regex, you can find some more about it in the apache docs
I hope this can be useful to someone with the same need to acces phpmyadmin in the lan.
Enter this in your other computer?
http://<IP of your computer (something like 192.168.0.100)>/phpmyadmin/
You can find out your IP by double-clicking on your network connection and looking at the second tab.
Edit: If you set the permissions correctly in MySQL, you can use
mysql_connect('<IP>','root','')
to connect.
Edit the httpd.conf file in the Apache and Give your IP address where ever you find either loccalhost or 127.0.0.1.
You can use the IP address of the host where DB exists
mysql_connect('ip_addr', 'mysql_user', 'mysql_password');
精彩评论