how can i connect to my mysql server using localhost? - mysql

this might sound stupid, but i never experienced such thing, im developing on my localhost, but i have my server with 1 and1, how can i connect to my database on my server using my localhost, what will the host be? thanks

Try just using the string "localhost" as the hostname or the IP address if you know it.
If that doesn't work you could contact the 1 & 1 customer support.

host will be localhost or 127.0.0.1(This is IP address for localhost). I hope it will work

First, make sure that mysql is actually listening on localhost (127.0.0.1).
You may be connecting over your public IP.
If you want to test running mysql only on localhost, this quick howto shows you
what to put in your /etc/my.cnf

Use 'localhost' as your host when connecting between db and localhost. In connecting your server to your database, follow the instructions from your localhost server website.

Related

Can't connect remotely to MySQL cPanel database

I can't connect remotely from Nodejs to a MySQL database from a domain. I've searched a lot, my ip is listed in the host list, and I've also checked the MySQL variables and the bind-address is set to *.
And, also, does anyone know why when I try to add a new host for remote mysql connections it says that the % wildcard is not allowed?
With another domain it works just fine.
Please help me figure it out.
Thanks!
You need to check if the port is open from remote by using MySQL workbench or other clients. You can also use telnet in the command line:
telnet {database ip} 3306
If you got a timeout, It seems there is a Firewall or Mysql config not listening remote IPs so call your ISP or hosting provider and ask them for open access.
But if you got "access denied" message or telnet connection was successful, we have something wrong in MySQL user privilege.

Couldn't connect linux mysql server from other server

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.

Is server being localhost:3306 an issue? phpMyAdmin

When I access phpMyAdmin from GoDaddy it says the server is localhost:3306 and therefore can only connect to mySQL using localhost as servername. Should the server be my websites url or ip address? Do I need to set it up?
No, you do not need to set it up. The fact that it is showing localhost:3306 in GoDaddy simply shows that it's on the same server with your hosting package.
If you're connecting to this MySQL instance from PHP, you would connect to "localhost" as the server address. No port should be necessary as 3306 is default for MySQL.
No, the server should not be set up to use your websites url or IP address, as having it at localhost in essence does that. It's on the same server AS your website.
Does that make sense?

Remote connect to MySQL on VPS server using MySQL Workbench

i have a problem with connecting the MySQL workbench remotely on my VPS server, and i have not an idea what is the problem...
I'm using the cPanel user to connect to the database
I have added my current IP to the white list (allowed hosts)
I'm using domain name (or server IP) as hostname
I'm using default port 3306
I got the error 10060
What could be the problem, and how can I solve it ?
The problem is solved by adding the client IP address to csf.conf file.
Thanks.

Can't connect to mysql server on 'localhost' (10061) after replacing localhost at etc/hosts

I am adding the facebook authentication to my django application using the link http://goo.gl/hQ5nx5. I am using Wampserver for Mysql. There's a direction in the above link at step-4 to add an entry in the C:/Windows/System32/drivers/etc/hosts file that maps 127.0.0.1 to something like test1.com. But after this when I run my server through cmd, it gives the error: Can't connect to mysql server on 'localhost' (10061).
Kindly suggest me the solution to this problem. Thanks.
Is your settings.py pointing at localhost? You could adjust it
to point to test1.com, but that's likely to then cause issues when
you change back, so a better answer is:
/etc/hosts supports multiple hostnames for an ip address. You probably want a line like
127.0.0.1 localhost test1.com