This is the first time I am setting up a remote connection and I am doing this.
mysql -u user -password -h dbserver.dev.5bfed886-8150-4a8d-b0d5-4c7cffb5c54c.drush.in -P 11831 dbname
I get this error back.
ERROR 2003 (HY000): Can't connect to MySQL server on 'dbserver.$ENV.$SITE.drush.in' (65)
I have scoured the web I am not able to find a solution, I would appreciate any help. I apologize beforehand if any information is missing (I am a first timer).
Try this:
mysql -uuser -p -hdbserver.dev.5bfed886-8150-4a8d-b0d5-4c7cffb5c54c.drush.in -P11831
mysql ask you for password after running
As the last commenter mentioned, you need to "wake" up the site. However, this can be accomplished just by reloading the homepage.
https://pantheon.io/docs/debug-connections/
Services such as MySQL and SFTP are running; however, the local client
is unable to connect due to an idled container or DNS issues. Before
further troubleshooting, wake the environment by loading the home page...
If you're trying to connect to Pantheon (which it looks like you are), you might just need to wake up your instance. I did that with terminus drush --site=[site_name] --env=[environment_name] st where [site_name] is replaced with the machine name of your site and [environment_name] is replaced with the machine name of the environment you wish to awaken.
Related
I have a project running on Docker and I'm able to connect to the database through the terminal:
mysql -h localhost -P 33060 --protocol=tcp -u 'notmyrealusername' -p
This works fine and I'm able to show the tables from the database.
However, when trying to connect via SequelPro, I get the following error:
Unable to connect to host 127.0.0.1, or the request timed out.
Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).
MySQL said: Protocol mismatch; server version = 11, client version = 10
Note that the project is running on MySQL 5.7.34 and the version on my computer is 8.0.23.
OS: Mac OS Catalina
What I have tried:
From this thread, I have tried also with the port of 2200 and, well, SequelPro won't let me use 127.0.0.1. So, I couldn't try the second one.
I have also granted all privileges to both 'notmyrealusername'#'127.0.0.1' and 'notmyrealusername'#'localhost', but that didn't seem to fix it either.
Replying to Philippe's questions:
Yes, If I try mysql -h 127.0.0.1, then I get the same error:
ERROR 2007 (HY000): Protocol mismatch; server version = 11, client
version = 10
Question:
Does anyone know either how to connect to 'localhost' and not '127.0.0.1' on SequelPro or why I can't seem to connect to this database on SequelPro, when, with the same data, I can easily connect via terminal?
Thanks in advance for all of the help/suggestions you can provide!
Thanks!
I have finally found the solution. For anyone wondering, the key here is that I am using Docker. In this case, as outlined in this forum post, we need to:
Use the IP address of the machine where the database is running (the
real one, not localhost) as host address.
How?
Go to your terminal and use the command ifconfig . You'll get a bunch of data, but what you're looking for is the local network IP address. This usually looks like either 192.x.x.x or 10.x.x.x.
Then, in Sequel Pro or whatever GUI you are using, use this address (192....) instead of localhost.
I hope this helps someone and saves you time :)
Happy coding!
What I'm trying to do:
I have a Minecraft server, I'm trying to my an admin panel so the other admins can help out the server more closely.
Right now, I am trying to make a live console. My thought was is that if I have a script fire off every 10 seconds the script would perform a MySQL query and upload the log file contents to the Database and then on the webpage is would display the rows.
What I have tried:
So I looked on StackOverflow and you can query MySQL databases from the Ubuntu terminal and I have tried that.
mysql -u username#Database -pPassword -h azure.database.for.mysql.url -P 3306 -D SchemaName
It does not work as I get an error
ERROR 1045 (28000): Access denied for user 'username'#'machineIp' (using password: YES)
There were people saying to edit the configs and comment out "bind-address" however it seems to only apply to the machine the MySQL server is on, and not the one performing the queries.
Things to note:
The Web Server, Minecraft Servers, and MySQL Server are all on different machines.
The MySQL server is a SaaS provided by Azure.
I use this database for my web server and it works fine in connecting to the server so I believe it is not a MySQL server issue.
I also use this database for my Minecraft permissions plugin and it connects fine.
If you have more questions please ask and I will do my best at answering them.
It looks like its not accepting your password.
This is the format that I use to access mysql from terminal.
mysql --prompt="(\u#\h) [\d]> " --user=your_username --password your_password
I am trying to export database from AWS RDS to my localhost, mysql dump command is like:
`mysqldump -h xxxxx(my RDS account) -u xxx(my username) -p remote_db > dump.sql`,
then my terminal would ask me to enter the password, after entering passsword, it kept showing Got error: 2003: Can't connect to MySQL server, what may cause this problem? I have checked this
Can't get mysqldump to connect to local mysql instance (error 2003 / 10061)
and try to use this solution to fix it, but same thing happens everytime, what can i do?
It is a best practice that your database should be always private so most probably your database would be in private subnet(Not accessible from internet), If RDS is accessible from the internet so check your Security Group, NACL & Route Table configuration.
Feel free to comment if you face same issue the after above checklist.
I'm currently trying to run an application on a server but my customer is very 'picky' about their data and wish to store the database on their own internal office server. I've installed MySQL and can get the application to run locally but for a few specific reasons the application needs to run else where.
I basically can't get access to MySQL from a different location. I think my main stumbling block is port forwarding to the correct location. MySQL is installed on a mac mini with local IP address 192.168.1.242 and the router/modem is an Apple Time Capsule. I've tried looking at tutorials but they all have options that I don't have access to. I've attached a screenshot of the options I have access to and the settings I've tried so far.
Other information possibly needed is:
I need to connect from PHP
I've set a user up within MySQL with a wildcard (%)
I'm testing it using the following: command on my local machine in CMD: mysql -u username -h remote_ip_address -p
I get the following error: ERROR 2003 (HY000): Can't connect to MySQL server on 'REMOTE_IP_ADDRESS' (10061)
Firewall is turned off completely on the Mac Mini
There is nothing in the my.cnf file
OS is Sierra
That's all I can think of at the moment but any advice would be greatly appreciated and any more information required can be provided.
PS. evidently I'm not very good with MAC machines/networks
For anyone that reads this I had a very specific issue. I installed MySQL using homebrew. Homebrew binds MySQL to 127.0.0.1 therefore will only allow connections to MySQL from the same machine no matter what you try to do. To fix it I've had to edit /usr/local/Cellar/mysql//homebrew.mxcl.mysql.plist and replace --bind-address=127.0.0.1 with bind-address=*.
MySQL has an internal firewall of users/IPs. Even if you can connect locally, you might not have permission remotely:
Try this as root user on the MySQL server (locally first!)
GRANT ALL ON <db>.* TO '<user>'#'<remoteIP>' IDENTIFIED BY '<password>';
Where
<db> is the name of the DB
<user> is name under which you connect
<remoteIP> is your external office IP FROM which you are trying to connect
<password> should be self-explanatory!
This will explain the options better
I've just recently installed my Macports MAMP environment and I thought I'd followed the directions, but couldn't get MySQL to run. After much wrangling and testing, I've stumbled upon what the problem is, but I have no idea how to solve it.
I was getting the classic, irritating "Can't connect to local MySQL server through socket" error message. Checking and rechecking, the socket file was exactly where MySQL expected it to be and was set to the right permissions. Then, while trying to troubleshoot, I attempted to log in while I was still in superuser and boom! I was in!!
Leave superuser and it no longer works. Doh!
So my question is: how might I correct this problem and get it to run as a regular user? The trouble with Google searching a topic like this is that the two user systems - MySQL and Mac - are getting confused and I'm not finding the solution I need.
Thanks very much!
A brief example of the problem:
`tomb# mysql -u root -p thisismypassword
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql55/mysqld.sock' (13)
tomb#sudo su
Password:
sh-3.2#mysql -u root -p thisismypassword
mysql >`