0
  • I have mysql server on computer A (ip 192.999.1.1)
  • Computer B is connected via wlan (Computer name: Vostro; ip 192.999.1.2)
  • Both machines are running Kubuntu 14.04
  • I want B to access mysql on A

Here is what I have done so far:-

  1. Comment out bind-address in /etc/mysql/my.cnf
  2. mysql> create user Vostro@192.999.1.2 identified by 'xxxxx';
  3. Grant permission. mysql> GRANT ALL ON . TO Vostro@'192.999.1.2' IDENTIFIED BY 'xxxxx';
  4. Restart computer A

When trying to access 'A' from 'B':-

~$ mysql -u Vostro -pxxxxx -h192.999.1.1

I get:

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

Any ideas?

Have since found this posting which resulted in a working mysql client

https://stackoverflow.com/questions/1...s-mysql-ubuntu

Community
  • 1
  • 1
  • Welcome to Stack Overflow! You had some trouble formatting your question, so I fixed it for you. The MarkDown notation is used for layout which you can read [here](http://stackoverflow.com/editing-help). – Brian Tompsett - 汤莱恩 Aug 29 '15 at 09:36
  • You might wanna check here: http://stackoverflow.com/questions/3578147/mysql-error-2013-lost-connection-to-mysql-server-at-reading-initial-communic – Dorvalla Aug 29 '15 at 09:42

1 Answers1

0

The parts of an IP address can only be 0 - 255. So 192.999... isn't a valid IP address. Private addresses should also (in your case) start with 192.168.. Just try 192.168.x.y (with x and y smaller than 255 ;)), like 192.168.0.1 and 192.168.0.2. See here.

ahuemmer
  • 1,653
  • 9
  • 22
  • 29
  • Sorry, I should have said the ip addresses were fictitious – Bill Lancaster Aug 29 '15 at 12:24
  • OK, I see... Then I'm afraid I can't see the problem. Possibly, Dorvallas suggestion to have a look at http://stackoverflow.com/questions/3578147/mysql-error-2013-lost-connection-to-mysql-server-at-reading-initial-communic may help you? – ahuemmer Aug 29 '15 at 12:40