I have a MySQL Server 5.5.32 running on Ubuntu 12.04. Ubuntu is being run on VM. Host platform is Windows 7. How can I connect with the Ubuntu's MySQL from Windows?
I have done the following so far:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Running a show grant for root;
displays this:
+-------------------------------------------------------------+
| Grants for root@% |
+-------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION |
+-------------------------------------------------------------+
But when I try to connect to this server from SQLYog running on Windows, I get an error Error 2003 Cannot connect to mysql server on '192.168.xxx.xxx'
.
The IP being feed to SQLYog, I got it from ifconfig
. Supplied the inet addr.
inet addr:192.168.226.xxx Bcast:192.168.226.yyy
Is the address being used is incorrect or are these grant issues? Please advice.
Step 3: Connect to a Local MySQL ServerEnter mysql.exe -uroot -p , and MySQL will launch using the root user. MySQL will prompt you for your password. Enter the password from the user account you specified with the –u tag, and you'll connect to the MySQL server.
Select Connections from the SQL navigation menu. In the Authorized networks section, click Add network and enter the IP address of the machine where the client is installed. Note: The IP address of the instance and the mysql client IP address you authorize must be the same IP version: either IPv4 or IPv6. Click Done.
You problem is that (probably) your mysql is bind to 127.0.0.1
instead of 0.0.0.0
.
You should change bind in /etc/mysql/my.cnf
to 0.0.0.0
bind-address = 0.0.0.0
And then restart mysql of course.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With