if php uses the following server name mysqlxx.90 and the username ouxxxxxxch to connect successfully to the local database and the server IP is 1x.xx.xx.x8, what would I usually enter as the server name to connect remotely.
Confusing question... I can connect properly to the database through ssh and command line, could it be that I'm just being blocked remotely, and how would I prove this??
Just use the server IP to connect. Obviously, port 3306 will need to be open to connections and your MySQL username and password must be accepted by the server.
You can try
telnet <serverip> 3306
on the command line to see if you can connect to the server on port 3306.
Related
I am try to using MySQL Workbench but its showing error "Cannot connect to database".Neither it taking it localhost or my Endpoint of AWS RDS as DNS in host in workbench.
"I am using Xampp for mysql server running on port number 3306 "
Error :
Cannot connect to DataBase Server
Your connection attemp to failed for user 'root' from host to server at localhost:NULL;
can't open named pipe to host:pipe:MySQL (2)
Please:
1.Check that mysql is running on server localhost.
2.Check that mysql is running on port NULL (note 3306 is the default,but this can be changed)
3.Check the root has rights to connect to localhost from your address .
4.Make sure you are both providing a password if nedded and using the correct password for localhost connecting from the host address you are connecting from.
If you want to test the connection to MySql, Use Heidi (i recommend it). If it didn"t work, check if your DataBase server is running in port 3306 by taping:
netstat -atp tcp | grep -i "listen".
You can also change listenning port in /xampp/mysql/bin/my.ini:
my.ini:
Password = your_password
port = 3306 ---> 3307
socket = "/ xampp / mysql / mysql.sock"``
Looks like you have no port configured. Check your connection settings that you have a port set.
Every time I try to connect to my mySQL on mysql workbench, it gives me this error message saying:
Your connection attempted failed for user 'root' from your host to server at http:x.x.x.x:3306: Cannot open SSH Tunnel:Error connecting SSH tunnel:Error Connecting to SSH server Error 11004 get addrinfo failed
I think you could get solution here: http://quintagroup.com/services/support/tutorials/mysql-linux
or follow this steps:
Open putty and accept the certificate of the server
hostname should be localhost ( in order to use local socket and not http conection)
local port should be something like 33010 not 3306
local port is the conection back port used by the plink and has nothing to do with mysql ports
I'm trying to setup a new connection in MySQL Workbench to MySQL server on my other network computer named say: SERVER
Hostname: SERVER
Port:3306
Username and password I leave blank.
I'm getting "unknown server host"
SERVER has dynamic IP.
How do I provide the correct Hostname?
I don't think that you can connect to a computer of your network with its name only in MySQL Workbench.
So, if you can't allocate a fixed IP with DHCP to your computer running MySQL maybe you could use port forwarding in your router config (localhost:port -> computer2_ip:mysql_port) so you will be able to connect to localhost:port in MySQL Workbench. You could also create a tunnel between the two computer but I think this is rather a question for ServerFault.
I just created a test RDS instance through the AWS console, and it has been created successfully (it says it is running and available). I currently have my security groups configured to SSH port 22 (MyIP) Custom TCP Rule port 3307 (myIP) and HTTPS port 443 (MyIP). I am currently trying to connect through MySQL workbench. I am using the endpoint of "RDS_URL" :3307 and inputting my username and password. Every time I try to connect, I get this error:
Can't connect to MySQL server "-RDS_URL-" (10060)
Any suggestions?
Default MySQL port is 3306, In RDS you can't change it but in datacenter hosted DB, you can change by changing in my.cnf file and restart it. Before doing it open the port from firewall rules.
I've a question to the mySQL Workbench.
I want to connect to the mysql DB at the domain aaa.com. I write at the connection options these dates:
Hostname: www.aaa.com
Port: Which port do i have to write in?
Username: Username of the DB (which is 100% correct)
Password: Password of the DB (which is 100% correct)
Default Schema: Name of the DB (which is 100% correct)
If I click connect there is following error:
"Access denied"
Also you can ssh tunnel:
Create a new connection, select Standard TCP/IP over SSH.
For SSH host name enter your domain aaa.com (the domain you would SSH to).
For SSH username enter your SSH username, so if if you ssh test_user#aaa.com your user is test_user.
Store your SSH password or key files, which ever you use.
The Mysql hostname should be 127.0.0.1 if the mysql server is on the server you are SSH'ing to, else the IP or host name of you Mysql server.
Mysql server user - your mysqsl user.
And your Mysql server password.
This way your database isn't externally acceptable, meaning no one can trying to access it from outside your server on port 3306, but you still have access it through Workbench
Contact your web hosting company to make sure they allow remote connections first. It's disabled by some hosts. Default port will be 3306.
Generally, for security reasons, the incoming connections from external domains will be disabled. Contact your host if that is allowed.
By the way, the default port of MySQL is 3306.
If you have root access to phpMyAdmin, you can see if the port is opened using this tutorial: Install MySQL and enable remote access.