Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how connect to phpmyadmin from other hosts

I have a lan network with 2 computer and installed wamp on computer 1.

now I want to access to whole of phpmyadmin on computer 1 from computer 2 and make changes.

from users tab in root of phpmyadmin page I created a user. I filled username field with 'root' and host field with my computer 2 IP address and left password field with "no password" and checked all Global privileges for my user.

now I connect to wamp on computer 1 from computer 2 and click on phpmyadmin link. but It give me this error:

FORBIDDEN

you don't have permission to access /phpmyadmin/ on this server

what I must do now for solving this problem?

like image 883
saeid ezzati Avatar asked May 29 '13 11:05

saeid ezzati


People also ask

How do I access my phpMyAdmin database from another computer?

For security reasons, phpMyAdmin is accessible only when using 127.0. 0.1 as the hostname. To access it from a remote system, you must create an SSH tunnel that routes requests to the Web server from 127.0. 0.1.


1 Answers

That error message has more to do with Apache blocking access, than with phpMyAdmin, or the MySQL user account created.

Your issue is with Apache's configuration, or more specifically your WAMP's configuration of the /phpmyadmin URL.

Find the configuration file where the \phpmyadmin URL Alias is set up. It possibly will have these lines in it -

<Location /phpmyadmin>
  order deny,allow
  deny from all
  allow from 127.0.0.1
</Location>

Add another allow from IP.Address line in it to match the IP.Address of your other LAN system. Restart Apache.

If phpMyAdmin is not set up via an Alias (it is under WampDeveloper, not sure about other WAMPs like Xampp or WampServer), but is rather just a dump of its files in a DocumentRoot (website's webroot) sub-folder, check the .htaccess file there.

I filled username field with 'root' and host field with my computer 2 IP address and left password field with "no password" and checked all Global privileges for my user.

In this case, the host field will always be in relation to the location of MySQL, not to the system phpMyAdmin is being accessed from... If you are accessing MySQL via phpMyAdmin, the host field should always be - localhost. As phpMyAdmin is on the same system MySQL is. The only time you'd use another domain-name, host-name, or IP for host: is when you are accessing MySQL directly from another system. By directly I mean, not via a script or URL, but via some type of a client (which is almost always a binary/executable).

like image 77
rightstuff Avatar answered Sep 17 '22 14:09

rightstuff