How to access mysql from ubuntu in vmware - mysql

I have MySQL installed in a Windows pc and have Ubuntu installed in VMWARE.
When I am trying to access MySQL through a hibernate application in Ubuntu I am getting the following error : Host 'HOSTNAME' is not allowed to connect to this MySQL server
. What configuration changes do I need to make to access MySQL server?

You have to GRANT access to your remote user/host. See the manual or this article.
The GRANT syntax is here.
HTH.

Related

ERROR 2027 (HY000): Malformed packet - during login

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password:
ERROR 2027 (HY000): Malformed packet
I have 2 MySQL DBs version on my server 4.0 and 5.7. My apps can connect to both MySQL DBs without problem but when I try to login to the MySQL Command-Line Tool it is showing error as shown below. I also noticed even when I stopped the MySQL 5.7 service it is showing the same error but if I stopped the MYSQL4.0 service, it is showing:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
Based on the some of the replies from similar topics, the malformed packet is because of the old password hashed issue but what are the things I need to do to change the password? Or my issue is not related with password?
FYI, I am using Windows Server 2012 R2. Mysql 5.7.21 and Mysql 4.0.17
It's compatibility issue between MySQL 5.7 client and MySQL 4.0 server.
My apps can connect to both MySQL DBs without problem but when I try to login to the MySQL Command-Line Tool it is showing error as shown below.
The reason may be simple, apps may be using diffrent version of Mysql connector API, e.g. App connect with v5.7 may be using 5.7 compatible liberary.
When you connect to MySQL 4.0, use MySQL 4.0 client and similar for MySql 5.7.
When you run both version simultaneously, make sure to specify the correct port.

Can't connect to database (10061)

I have a Raspberry Pi (first model) I use as a server. I followed a tutorial and installed Apache2, MySQL, Phpmyadmin etc.
I have also set up a ddns for my home network to be able to connect to it wherever I am, and of course forwarded the necessary ports.
At first everything worked wonders.
I could connect to the database using phpmyadmin by navigating to adress/phpmyadminfrom any network.
I could also use HeidiSQL to connect to the database, again from any network.
The MySQL version I had at this time was v5.5. I wanted a feature available on v5.6 but this version was not available on my RPi (ARMv61). Instead it seemed like MariaDB should do the trick. So I updated to MariaDB using the command:
sudo aptitude install mariadb-server
Now I am not able to connect through HeidiSQL anymore, Phpmyadmin still works though from any network just like previously. Trying to connect with HeidiSQL I get the output (no matter what username/password i try):
Can't connect to MySQL server on 'adress' (10061)'
mysql -V gives output:
mysql Ver 15.1 Distrib 10.0.27-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2
My RPi info is
Linux redface 4.4.26+ #915 Thu Oct 20 17:02:14 BST 2016 armv6l GNU/Linux
The user privileges are available in the image below
How can I connect to the database again using HeidiSQL? Have I missed something with the user privileges?
With phpmyadmin I use the username root
This particular error is not about permissions.
The code (10061) is WSAECONNREFUSED -- a Windows socket error code for Connection refused, not to be confused with "access denied."
Connection refused typically means no service is listening on the target IP address and port. MariaDB is not listening on 0.0.0.0:3306.
mysql -V only tells you the installed client version -- it doesn't tell you anything about the MariaDB server.
Access to phpMyAdmin doesn't tell you anything, either, because with it, you're not talking to the database server remotely -- you're talking to your web server remotely, and your web server is running code that talks to the database locally from within the same machine, and often uses a different mechanism of server access that is not TCP/IP.
Check the config file for a commented-out bind_address=0.0.0.0 or similar.
https://mariadb.com/kb/en/mariadb/configuring-mariadb-for-remote-client-access/

MySQL remote connection to Linux

Do I have to install MySQL on Windows to be able to connect to a MySQL server running on Linux and edit the files from windows ? Because I was installing the Workbench for SQL (I'm using MySQL Workbench Guide, Source: MySQL Workbench), then allow access to Linux (vps) from my pc, when I tried to install it, I'm stuck in the Windows config settings. Can someone help? (Screenshot provided.)
1 more thing: the program said "installing wmi" then "Could not set up connection: Could not connect to target machine."
you can install only workbench in windows without installing mysql server but you need to create a user on linux mysql server, who can then access it from the windows machine:
CREATE USER 'newuser'#'IP of the windows machine' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'newuser'#'IP of the windows machine';
FLUSH PRIVILEGES;
if you want the user to access regardless IP then you can use '%' instead of IP

Do I need to install MySql separately on Windows 7 if I already have MySql Workbench

I have installed MySql Workbench 6.3 CE on Windows 7 , I was assuming it installed MySql for me as well. Although now on command prompt it gives me
Can't connect to MySQL server on Localhost error message
Do I need to install MySql separately in this instance then? I see MySQL.exe in workbench folder, I assumed thats the MySql itself.
Thanks.
Yes, MySQL Workbench does not bundle nor install MySQL server. Your error indicates a missing local MySQL server connection. If you want to connect and use a local MySQL instance then you must install a local MySQL server. Since this question is Windows specific, you should use the official MySQL Installer for Windows to install and manage both.
In summary, Workbench includes a MySQL client (something you can connect to a remote or local MySQL server with) but it does not include MySQL server.

Phpmyadmin cannot connect to mysql: 2054 - Connecting to 3.22, 3.23 & 4.0 servers is not supported

I've installed new XAMPP, version 1.8.1, it works, but I cannot connect from phpmyadmin to database. Message in error said that I had old mysql database. I downloaded version 5.5 and installed it and I get still this same error. In XAMPP apacha and mysql are started. When I installed mysql I was created password for root and I didn't created second user. Maybe samewhere in phpmyadmin configuration I should change password for the root too ?
Error:
Error
MySQL said: Documentation
2054 - Connecting to 3.22, 3.23 & 4.0 servers is not supported
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Thanks
change to new server of mysql or change the version of phpmyadmin