0

As a follow-up question on this one:

Accessing localhost (xampp) from another computer over LAN network - how to?

I can access localhost in my browser and MySQL but not from the command-line

I can not figure out how to get from there. From the command-line I use:

mysql -u root -h "IP of remote localhost"

And getting the following error "Error 2003(HY000): Can't connect to MySQL server on "

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
MrSlippyFist
  • 481
  • 2
  • 6
  • 19

1 Answers1

1

Basically you need to enable remote access.

This is for mysql workbench

Clicking the [+] icon from the home screen launches the Setup New Connection wizard. The wizard provides a MySQL connection form to create a new MySQL connection, and includes a Configure Server Management option as a step-by-step approach to creating a new MySQL server connection. This can also be executed later (on remote connections) when from the home screen by clicking the top right corner of a MySQL connection tile:

Executing this wizard is required to perform tasks requiring shell access to the host. For example, starting/stopping the MySQL instance and editing the configuration file.

And here is a tutorial where you can peform it step by step:

https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html


This is to do it over xamp

You need to open up the configuration it will look something like this:

# The MySQL server
[mysqld]
user=mysql
port=3308
socket      =/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
key_buffer=16M
max_allowed_packet=1M
table_open_cache=64
sort_buffer_size=512K
net_buffer_length=8K
read_buffer_size=256K
read_rnd_buffer_size=512K
myisam_sort_buffer_size=8M
bind-address = 0.0.0.0

And you will need to specify the IP adress:

bind-address=192.xxx.xxx.xxx
DaAmidza
  • 336
  • 2
  • 7
  • 25