i can't access my website mysql db from sqldeveloper.
in cpanel there is an option (Remote Database Access Hosts) which allows one to add IP addresses that can access the db. I have entered my ip address and i have used the % wildcard.
so for instance if my ip address was 12.34.56.78, i have entered my ip address as:
1 - 12.34.56.78
2 - 12.34.56.%
3 - 12.%.%.%
in sqldeveloper i have downloaded and added the mysql third party jdbc driver .jar file (mysql-connector-java-5.1.13-bin.jar).
i have the right user name, password, hostname and port.
so, if my website domain was called www.mysite.com and my username was user, the username i would use in sqldeveloper would be mysite_user.
and the hostname would be www.mysite.com.
the port i am told via cpanel is 3307.
i bow to any superior knowledge if my assumptions are incorrect.
any help would be appreciated
-- edit --
oh yeah, the error message I get (pretty important!) in sqldeveloper is
Status : Failure - Test failed: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
-- end edit --
I do the same via cPanel but after i connect to my host via SqlYog community edition...
Uniqe differce is the port, i use the standard 3306 port instead a custom port.
Try if it connect: http://code.google.com/p/sqlyog/
It turns out that i did need to use port 3306 but more importantly, my web host needed to make a change on their firewall.
i managed to connect using mysite.com, username, password and port 3306.
thanks #Achilleterzo for your help in the meantime
Related
I am having trouble connecting to my RDS MySQL Database.
My current Set up:
Django 1.9+
AWS - Launched an EC2 Instance (Amazon Linux). Launched an RDS instance of MySQL (5.6.7). I created a Virtual PC (VPC) for the EC2 instance and RDS instance, and in that group created several security rules so the EC2 instance could connect to the MySQL RDS. Below are the security rules I use and associate with the VPC.
Inbound Rules: (Type, Protocol, Port Range, Source)
1. Http , TCP, 80 , 0.0.0.0/0
2. SSH , TCP, 22 , <homePC address>/32
3. HTTPS, TCP, 443, 0.0.0.0/0
4. MYSQL/Aurora, TCP, 3306, source (my created security group)
Nginx - Serving my content redirecting from port 80 to port 443. I created SSL certificates in order to make my site secure. I correctly served my Django application, and the static files. Nginx serves everything great!
Previously I was able to connect to my RDS instance. I did not set up an elastic IP at that point in time, as it took some time to transfer my domain over to Route53 (amazons DNS). I successfully was able to transfer it, and associate it with my EC2 instance and even start my application
The problems -
First Problem I cannot connect to the RDS from my EC2 instance. I have checked my django settings file and the secret file (the one that feeds my settings file with sensitive information which I keep out of version control). Here are examples of my settings for the mysql connection - I changed them obviously
"DATABASE_NAME":"myDatabase",
"DATABASE_USERNAME": "myUsername",
"DATABASE_PASSWORD": "myPassword123",
I double checked the username and password in the RDS console, and even reset the password.
After I went ahead and activated my virtual environment and attempted to connect.
python manage.py dbshell
My Error was
ERROR 1045 (28000): Access denied for user 'myUsername'#'<private IP address from Elastic IP>' (using password: YES)
Notive the user name is not what I utilized in the settings. It changed. I feel this is the root cause of the problem, but am unsure why Django would change my username in such a manner.
Second Problem - I also try to connect to the database directly using mysql. I double check my endpoint, username and password are correct, but also run into trouble connecting.
Note - As I said, I was able to connect in both manners listed above before acquiring my IP address. Thus my troubles are configuring security rules to allow a permanent IP address, and being unable to use TCP connect to use the Mysql client to log in.
Thanks in advance.
I'm having a right nightmare trying to link Microsoft Access to MySQL.
I have selected the ODBC 3.51 to connect to mysql on access
Details required:
TCP / IP - mysql8.namesco.net OR IP Address
Named Pipe - BLANK
Username - **
Password - **
Port - 3306 (Default)
Database name
After I enter the above details i'm prompted with the following error:
Connection failed:[hy000][mysql][odbc 3.51 driver]Cant connect to MYSQL server on 'mysql8.names.net' (10061)/
I get the same error when I use ODBC 5.1 Driver:
Connection failed:[hy000][mysql][odbc 5.1 driver]Cant connect to MYSQL server on 'mysql8.names.net' (10061)
I have no idea what i'm doing wrong!
any help to resolve this would be amazing!
Can you ping the MySQL server from your machine? Can you connect to MySQL from your machine with any other MySQL client?
Sometimes hosting companies like names.co.uk put their MySQL servers behind firewalls. You may need to consult their tech support if you need access from someplace outside their data center.
Max Thorley: How do i ping? is it telnet IP address? I contacts names
to allow remote access. I gave them my public facing IP and IPv4
(which i believe is static)?? This what I get with telnet
C:\Users\max.thorley>telnet 192.168.35.24 Connecting To
192.168.35.24...Could not open connection to the host, on port 23: Connect failed C:\Users\max.thorley>telnet mysql9.namesco.net
Connecting To mysql9.namesco.net...Could not open connection to the
host, on por t 23: Connect failed
Try telnet mysql9.namesco.net 3306 to see if you can access the MySQL port. You probably can't. If you can't get to it you'll get a similar message to the ones you got with other telnet attempts. That means your hosting service has firewalled the MySQL server. If you can get to it you'll get some gibberish that looks roughly like this:
5.5.5-MySQL
%\~)L%q? $p*}X!73:i%wmysql_native_password
You probably can't get to it. This is common hosting-service practice, because it's a shared server and it's not very hard to mount denial-of-service attacks against MySQL servers. Again, you need to consult your tech support.
if its a hosting server you need to log into your cpanel and add your
external ip in the allowed ip range to connect the databases. also
many hosting have standalone ip for accessing database. as below
answer says raise ticket to your hosting support and ask for help –
krish KM
Im trying to gain access to a mysql database hosted by one site from another website.
In short I am in the middle of transferring from one host to another of my website.
I have imported my database from host A to host B, and also uploaded my website.
Host B is now up and running but I want to keep Host A going for a while until people move over to the new host.
So I want host A to use the db on host B.
I have turned on remote mysql on host B and added the shared ip address of my website of host a. This I believe should allow host a to connect to the db on host B.
I have changed the connection details in my php script to the user,db,password details of the db on host b.
But i'm getting a connection error of cannot connect to db.
I have added my home ip address, created an odbc connection on my pc and used access to connect to the db on host b, with success so I know that host is accepting connections remotely.
I have also tried adding the web address of the my site on host A to the remote mysql, and tried using a open wildcard of '%' hoping that would let any remote connection, but still no look.
Is it possible that host a has blocks on connecting to external mysql databases or am i missing something simple?
Help would be appreciated.
Check that your firewall is allowing connections through on port 3306.
Check the MySQL configuration parameter bind-address in my.cnf to ensure that it is allowing remote connections.
There's information and troubleshooting tips here:
http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html
I hope this post helps you to debug this issue
Can't Connect to MySQL Server on IPAddress (10061)
I have setup SQL Server 2008 Developer Edition. It automatically contains my system name which is sipl006 as Servername. My system IP is 172.27.28.44. My issue is it is not connecting remotely with IP address because my database is also accessed by different domain and I need IP address to authenticate the application with my database. I have googled about this but no helps.
servername : sipl006
Authentication : Sql server authentication
username : sa
password : blablabla
I have already checked the below details
1. SIPL006 >> properties >> connection >> Allowed Remote connections.
2. Sql server configuration Manager >> enable named pipes, TCP/IP, via etc.
3. Confirm default port 1433.
4. Firewall is already off.
I have only MSSQLServer instance not SQLExpress.
I have observe the in View connection properties that instance name field is blank.
so I need to access the database with IP not system name because different domain not recognize system name. It only recognize only IP address.
I need the below details for connectivity.
servername : 172.27.28.44 or 172.27.28.44\SQLEXPRESS
username : sa
password : blablabla
Please resolve my issue.
Thanks in advance.
Make sure the client connecting to your database server has 1433 outbound from their location. Also like MicSim says, see if you can connect from a client that you know has 1433 outbound open.
Also if you are trying \SQLEXPRESS you may want to verify UDP 1434 and SQL Browser service and/or verify that \SQLEXPRESS is not using a port other than 1433.
I got mysql database in the phpmyadmin, and i try to connect to the database from my application.
My connection string is:
Server=12.919.18.12;Port=3306;Database=hbd;Uid=hb;Pwd=123;
An exception occurs:
"Unable to connect to any of the specified MySQL hosts."
Do I need to install mysql or something?
(I just imported MySql.Data.dll and tryied it. Is there anything I have forgotten? I checked the ip pinging my website).
Connection strings for MySQL
is pretty helpful in terms of connection strings. Your connection
string seems to be invalid.
You may check mysql server is working or not and you can add port number of mysql in connection string like this
"Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;"
Other reason MySql might be configured to listen to only the local host.
Follow the following links for more information:
Enabling MySQL Remote Access - MySQL connection only works from local machine
Unable to connect to any of the specified MySQL hosts.
IP is invalid 12.919.18.12
Server=12.919.18.12;Port=3306;Database=hbd;Uid=hb;Pwd=123;
IP block is < 256
If the datababase is local, try localhost or 127.0.0.1 as the IP address.
Is the server on your network? If so, the IP is invalid. If I were you, I'd try to check the IP with the person who gave it to you.
the connection string is correct but as ive read a lot of forums they all have the same problems as you do. my solution is that if your trying to create a network base system on a LAN type network you should use XAMPP or WAMPP but i prefer xampp and double check if your accounts or users have an Admin or any other user name for your connection and then see if they have granted all the privileges and with password of course.
Here is the ff instructions:
Open Xammp
Then open a web browser then open 127.0.0.1 or localhost.
click phpmyadmin then at the top click privileges.
add user and make it sure allow all privileges and check all access.
then connect again using the same connection string with the proper user and password.
This issue is RESOLVED :)
try to put the PORT in the end like :
"Server=12.919.18.12;Database=hbd;Uid=hb;Pwd=123;Port:3306;"