After dropping a schema in MySQL workbench and attempting to re-create it (a process I have done many imes, it is just an easy way to clear out the database so that hibernate can recreate it), I suddenly got this error for the first time and now I cannot do anything with MySQL workbench. Any help?
Cannot Connect to Database Server Your connection attempt failed for
user 'root' to the MySQL server at localhost:3306: Unknown database
'bookstore'
It then makes me check that MySQL is running on localhost, port 3306, user root has rights, password is correct, etc. This is all correct. I know the database is unknown because I dropped it, but I am not sure why that is causing an issue now when all I want is to be able to log in to the server. I tested the connection via settings for the server connection and it is actually able to connect fine. I have done this before many times with no issues.
Any help would be greatly appreciated.
Related
Hi I am trying to connect to my MySQL DB which is hosted by strato. On their site I can create a DB and I did. I am able to connect via PuTTy like shown in this link. And I found the port, hostname etc as you can see but now I am trying to connect to the database via NaviCat but I keep getting the following error: 2013 lost connection to mysql server at 'reading initial communication packet' system error 0.
I configured NaviCat like this (as password I filled in the masterpassword strato provided me)
and this (as password I filled in the masterpassword strato provided me)
Screenshot of the error I am getting:
There is also a page on my hosters site with an tutorial on how to connect to their DB using PuTTy: link to page
Maybe you're wondering why I don't contect the host, it takes ages for them to reply...
What am I doing wrong why cant I connect how can I fix it?
If anyone can help me i would rlly appreciate it!
The manual says the hostname for a database connection should be
rdbms.strato.de
Or has this never been possible? I quote Can not connect to mysql database [strato]:
Connection posibilities(access) depends on your hosting package. But,
actually, remote connections to strato mySQL is not allowed(security
reasons). I have the same trouble with PowerWeb Basic.
The access is probably meant for applications you host with them, not running elsewhere (eg. at home).
If you want to work locally, perhaps they allow you to take a dump of your database that you can install locally? Do they have PHPMyAdmin?
I have successfully got Seafile Server fully working with HTTPS.
However I'm trying to migrate from SQLite to MySQL and everytime I try, the seafile server stops working.
I'm not sure what information to put here that yous will need but happy to provide what ever you need.
I followed this guide Deploy Seafile Windows Server With MySQL
Its really frustrating, I dont understand why its not working. I also installed MySQL Workbench and I can see the seafile user with privileges and the databases populated with the tables.
Are there any messages in the logs?
Please look at the logs in /seafile/logs/
You will see an error message in seafile.log if you have problems with MySQL.
For example:
../common/seaf-db.c(123): Failed to get database connection:
Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (107).
http-server.c(761): DB error when check repo existence.
Disconnected from daemon
I have done such migration already and it did work without problems.
I am continuously getting below error while connecting to mysql-
Can\'t connect to MySQL server on /ip/address
but mysql is not generating any log for this error. I have below entries in my.cnf file
log=/var/log/mysql_err.log
log-error=/var/log/mysql/mysql_error.log
I am using correct credentials. No issue of conections.
Now how will I determine the exact issue If I'll not get any log ?
Any Idea, how to solve this ?
This is not surprising:
the server can only log an incident it is aware of. However your client does not even reach the server at all! So how should the server know some client has attempted to contact it?
The error message you get clearly indicates that you do have a connection issue.
You can easily make a test to check the most common problems: just open a telnet connection from the system trying to connect to the system the sql server runs on, connect to the mysql port: telnet <ip-of-mysql-server> mysql
On typical unixoid systems "mysql" will be substituted by the "well known port number of mysql, which is 3306. otherwise you have to specify it manually. Do you get a connection at all? I would guess not. This means either the mysql server is not listening where expected (not running or configured otherwise) or the connection is blocked on network level (firewall).
I have a windows server where Plesk is installed with php & mySQL by default (from Hosting Provider). When I first got the server I remember I removed mySQL from Control Panel since I didn't need it, but after like one year, I came to a point where I have to create a Wordpress website, and therefore I am needing mySQL again.
Note also that there's two mySQL, one for Plesk (which I didn't uninstall), and another one for our databases (which I uninstalled long ago, but reinstalled later).
I went to Plesk under Database Servers, and I can see there's no Database Servers there... Then I try to Add Database Server with the following settings:
Hostname: localhost
Port: 3306
With Admin Username & Password...
But I am getting the following error:
Error: A database server with this combination of host address and port number is already registered.
Please note that this is surely different from the mySQL settings for Plesk since the port is different.
Do you guys have any idea how to resolve this issue? I've been stuck since a few days...
I appreciate your help guys that's urgent!
Thanks.
Looks like inconsistency in plesk database "psa" related to entity of database servers.
Most easy workaround it's to register new database server not as "localhost", but as "127.0.0.1" or some other name which can be resolved to localhost or other port.
Another workaround it's to look into psa database via "%plesk_bin%\dbclient.exe" --direct-sql --sql="select * from databaseservers".
When I first set up MySQL Server in Netbeans everything worked well. Now one day I think I accidentally clicked something or my computer lost battery life when I was connected to MySQL Server, and after these event(s) I have not been able to connect to MySQL Server. I do not know for sure if either of the above events would have any effect on connecting to a MySQL Server database.
Anyway since these events I have found that I cannot "start" or "connect" to a MySQL Server databse. I am doing this all through Netbeans IDE.
Here is a picture of how I try to connect to my databaseL:
This is what the error message says after I click connect:
Unable to connect. Cannot establish a connection to jdbc:mysql://localhost:3306/twitterdata using com.mysql.jdbc.Driver(Unknown database 'twitterdata'). The name of the database I am trying to connect to is twitterdata
How can I get reconnected to the MySQL Server database "twitterdata"?
I am not familiar with MySQL, databases, servers and I have no idea how to get reconnected. If there is any other helpful information that I should provide let me know.
What MySQL tools can I run to find my problem?
Why would the error message tell me that the database is unknown?
If I got to C:\ProgramData\MySQL\MySQL Server 5.5\data. There is a folder named twitterdata.
Here are the contents of that directory:
Please let me know if you need more information or if you have other suggestions that would help!
Thanks for all the help!
If you are using windows system and facing the error 'unable to connect localhost 3306' at the connection time. First you have to need start MySQL services in 2 steps:
Press "Windows key + R" write "services.msc"
And run as admin start MySQL service.
There can be three issues:
1) Either your server isn't even running. Open your command prompt and enter mysql
2)Let's say it is , can you check if it's connecting on the correct port.
Like in the url, you are using 3306,
Try following this post:
How do I find out my MySQL URL, host, port and username?
3) Can you check what if there are any credentials to the database you are connecting?
https://netbeans.org/kb/docs/ide/install-and-configure-mysql-server.html