I tried everything which I found on google but couldn't connect linux mysql server from other server, Server where Mysql is located is Linux OS and from where I want to connect that is ubuntu, What can I do?
I already grant all privileges to user, bind-ip-address, and comment localhost etc. Is there any sqlserver's internal configurations?
Did you check ssh connectivity between two servers? if it doesn't works configure sshd properly and if ssh connectivity works fine then,The Target server's internal firewall might be blocking remote mysql connections.
After a long R&D, when nothing help me, I think about port number, and that was silly mistake, actually I check available port on AWS for that instance from I want to connect and found I forgot to open 3306 (default MySQL port). I just add this and everything became perfect.
Related
I have installed and running MariaDB server on a raspberry 4. I am trying to connect with Dbeaver but i am unsuccessful.
Hosting db details:
Raspbian: GNU/Linux 10 (buster)
mariadb: Server version: 10.3.34-MariaDB-0+deb10u1 Raspbian 10
Client access:
Dbeaver: Version 22.1.5.202208211008
phpmyadmin
Now as you see, I have installed phpmyadmin as well and I can successfully connect to host. Also I can ssh remote connect.
However Dbeaver refuses to connect and times out.
What I have tried so far:
I have configured mariadb in 50-server.cnf to bind to 0.0.0.0
I have added an admin user account in mysql with all rights and is stated as admin#192.168.1.x, where the ip is the remote pc's ip with the Dbeaver.
I have tried adding also "admin"#"%"
What should I troubleshoot next?
What worked for me, after some tries, was that I went to Dbeaver connection settings/SSH/ and ticked the use SSH tunnel.In Settings I filled the server details and pi user and password.
Testing and connection was successful after some questions/answers about creating a key and a couple of directories.
I wend back to the connection and I was able to expand the connection view tree with Table/Views/etc
I am not sure why I needed the SSH tunnel to connect. It was not stated to any tutorial I used. Maybe someone in the community can help with this.
I have an Amazon Lightsail Ubuntu multi WordPress site set up with bitnami stack.
I'm looking for a way to access the Instance's database on Amazon Lightsail with MySQL Workbench remotely.
Please note that I do not have a seperate Lightsail database, as I'm trying to do things as cheaply as possible at the moment. So the following guide is not applicable to me.
Connecting to your MySQL database in Amazon Lightsail
According the wp-config.php MySQL database is using localhost:3306
I have static IP address 3.230.xxx.xxx. I have taken the DB username and password from the wp_config.php file.
I've entered the details.
I wonder if anybody else has managed to connect to an Instance's database, rather than a seperate database.
If this is not possible I wonder if there are any suggestions as how to best access this Instance's database remotely.
Found the answer using a similar youtube video which is used to connect to phpMyAdmin.
https://www.youtube.com/watch?v=9VdcQLDmYII
Basically you need to use Putty SSH tunneling in order to connect to the MySQL instance
First I added a new connection in Putty, make sure port 22 is open on
the LightSail firewall
Go to the Connection -> SSH -> Auth tab on the right hand side menu
Enter your SSH key which is downloaded from the Lightsail dashboard,
it will need to be converted in the standard recognised by putty
Go to Connections -> Data tab on the right hand side menu. Add a new
forwarded port we are forwarding localhost:3306 on the server to a
port on our machine 2222
Start the connection via Putty.
Now in MySQL WorkBench go to the connection to database windows.
Enter the port 2222 I entered the DB user and Password from
wp-config.php file and was able to successfully connect.
Also found a second method
Within the MySQL Workbench you can change the connection method to `Standard TCP/IP over SSH'. Gave the SSH key and the relevant details on connection was accepted
Here is what you need to remotely connect MySQL on Lightsail.
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-connecting-to-your-mysql-database
There are 3 steps:
get the endpoint link
enable public mode
configure MySQL workbench
Yes I have - after a marathon tech support session with AWS :)
Although the Lightsail firewall may say port 3306 is open, the server instance itself may have its own firewall settings which close it. On my case teh AMI that was used to set up the instance was configured that way
I my case it was Ubuntu but here is the summary of the advice I got from AWS--
We have connected to the instance via SSH using the user-name 'xxxxxx' from terminal.
--
ssh -l xxxxx 34.xxx.xxx.221
Checked and confirmed that mysql is running on the instance.
systemctl status mysql
Confirmed the port on which mysql is running.
netstat -plnae | grep 'pid'
Checked the 'ufw' firewall rules and noticed that 3306 is not allowed.
ufw status
Opened the port 3306 on ufw firewall
ufw allow 3306
After performing these steps you were able to establish connection to your database
hth
I have been trying to find a solution but could not fixed my problem. MySQL database is hosted on a remote server inside Virtual Machine, I have only rights to the Virtal Machne, I have tried following solutions but still my problem is not fixed: Added 3306 port for MYSQL in firewall settings, disabled the firewall, remove bind-address from my.ini files on my local machine as well as server and grant the priviliges from mysql client tool but no success. Can anyone help me out with this problem please?
I try to migrate MSSQL (local machine) to MYSQL (Amazon Web Services) usin Workbench. I can connect to both databases. However when I migrate I get this error:
Mysql connections through SSH are not supported in this version...
Well, I found this in documentation:
A workaround is to set up an encrypted tunnel, and then treat the MySQL target as a standard TCP (unencrypted) connection.
But I don't know how to set up a tunnel. Does anyone can help?
Okay, if I'm understanding this correctly, I think I'd prefer to set up a tunnel in Putty. I don't have a solid grasp of how MySQL Workbench works (I'm assuming its analogous to SSMS), but I have used maaany SSH tunnels in my day. Here are some basic instructions:
http://www.electrictoolbox.com/putty-create-ssh-port-tunnel/
You'll want to create a local tunnel from any port you choose (although I'd go with the MySQL default 3306) to the destination of 127.0.0.1:3306. Be sure to click add and save your session settings in Putty.
Open the SSH connection to the AWS machine. Try to connect to your MySQL instance through 127.0.0.1:3306. This should allow you to pull from your local SQL Server and send data to your AWS instance (through the tunnel, 127.0.0.1:3306 of course).
Hope this helps. Let me know if this doesn't solve your issue.
If you have Amazon ec2:
On Windows machine connect using putty via ssh:
In session host name (user#public_ip_address)
Connection -> SSH -> Tunnels (Source port: 3306 OR choose free one) AND (Destination 127.0.0.1:3306)
You can check if tunnel was establihed in event log (right click on terminal bar)
In Workbench now you can use TCP/IP without SSH.
Thanks guys!
I'm trying to learn the apache / mysql / php stack bundled with XAMPP. I can't connect to the MySQL server using the MySQL workbench:
Your connection attempt failed for user 'root' from your host to server at localhost:3306: Can't connect to MySQL server on '127.0.0.1' (61)
Thinking it's a port problem, I check the port directly in Terminal with the command telnet 3306:
telnet: connect to address 127.0.0.1: Connection refused
Obviously the problem isn't with the Workbench, but something to do with the port connection itself.
I'm using:
OS 10.8 Mountain Lion
XAMPP 1.7.3
MySQL workbench 5.2.47
Sorry all, I'm posting my own question and answer. I had this problem and it nearly destroyed me because I could not find the correct answer anywhere on the interwebz. I finally overcame it, and wanted to post my findings in case it helps another befuddled traveler.
It turns out when you install XAMPP and choose to run the security routines, it automatically turns on a setting in the MySQL preferences to block connections on port 3306 from localhost. To fix this, open my.cnf in the xampp folder xamppfiles/etc. Look for the setting "skip-networking" which tells mySQL to block the port 3306. Comment this out by adding a pound sign so it is "#skip-networking". Now, the telnet command should work, and you should be able to use the Workbench.
Hope this is helpful for somebody!If it fixes your problem, give me a shout at #mrcheeks3185.
I faced same problem but I solved it.
I changed the MySQL workbench port to 3307 in the file below
C:\ProgramData\MySQL\MySQL Server 5.7\my.ini
and keep the default port 3306 for XAMPP
for mac you should create only a user with password and grant access(in my case a I use root with password) and turn on ip address and use that address to connect with a client like navcat or workbench I use XAMPP 7.3
ip address network given by XAMPP
connection config in navcat
test connection
I found that file after mount the image disk created for xampp, there you can find new_disc_mounted/etc/my.cnf
If you do not have my.cnf you can first go to xampp->mysql->bin->my.ini, copy
the contents of the file, next create my.cnf (in the bin folder) and paste the content to the file you just created.
This works for me. I had the same problem. Now I can use both Xampp and Workbench on one PC.
There is an issue: when you start workbench you get some warning that some features may not work properly since database is not fully compatible.
If changing ports won't work. What I did, I just make sure both XAMPP and MySQL Workbench don't start the server at the same time. Just go to MySQL Workbench, Select Server > Startup/Shutdown > Shutdown.
its due to different version of xampp, open log file and check last status of mysql there is showing error find it or remark/change it
Actually XAMPP and MySQL workBench might be using same port an are conflicting "3306" in so you are getting that error
Please try changing the workBench's default port number to other number and try again