Is it an attack and what is the result ?
120406 15:47:32 44330 Connect Access denied for user 'sdgfsdgfsdgfs'#'89.107.230.194' (using password: YES)
44330 Connect sdgfsdgfsdgfs#89.107.230.194 as on
How to prevent that ?
It could be a hack attempt, they were unable to connect.
I suggest you install a firewall to solve numerous issues and prevent this from occurring in the future.
You should really disable remote MySQL access, set to only allow local inbound connections. Use a tunneling script if you really need to connect from elsewhere.
The verdict in those two lines of log is Access Denied. But you can search the whole file for access grants.
Related
I set up a google sql mysql db yesterday and was able to login to the db via google shell, create some tables, add some data and run some queries. Great.
Today, I am getting:
ERROR 1045 (28000): Access denied for user 'root'# .. ip address
I have tried resetting the password, adding new users via the cloud console, etc - but nothing seems to work. Any ideas?
So I figured this out, and it was completely not intuitive. At least for me, make sure that the setting for SSL connections under connections is set to: Unsecured connections are allowed to connect to this instance.
Working with Symfony2.3.4 and Xampp with PHP 5.6.3.
Basically my goal is to prevent anyone from tampering with the database tables directly via any manager(for example: phpmyadmin which comes with xampp via localhost/phpmyadmin/)
I'd like to find a way to set a password.
I looked for an option in phpmyadmin to set some type of security and found none.
I tried to set a password for the database via the config interface provided by the AcmeDemoBundle which i've always used to set the parameters.yml, all that did was to throw this at my face:
SQLSTATE[HY000] [1045] Access denied for user 'root'#'localhost' (using password: YES)
I need to know what I'm missing, is there a way to continue from here, or am I doing it wrong right from the beginning.
Remember: the goal is to let no one without authorization access the tables of the database in any way.
thank you
Thanks guys, I found what I needed here, answered by Anagio,
in the end what I had to do was to change the auth_type from config to http and voilá, a prompt appears when I hit localhost/phpmyadmin/ asking for user and pass.
Now all I have to do is to set a password for localhost and no one will be able to do anything to the database from outside the symfony app (hopefully)
I just exported my tables from one web host to another (AWS).
Thinking everything would go smoothly (yeah right), well, everything that can go wrong has gone wrong.
I get this error when trying to query my database (which I didn't get before):
SQLSTATE[HY000] [1130] Host '<my ip address>' is not allowed to connect to this MySQL server
This is the same error from this post:
Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server
The solution in that post seems to revolve around having an administrative user. I am developing a chat application so every user needs to access the server (so I'm sure it's a bad idea to give them all administrative privileges).
The answer by Pascal in that link says, If you are using mysql for a client/server application, prefer a subnet address. but I honestly don't understand what he means by that. And because of the amount of solutions, I'm not exactly sure which one I should follow based on my case.
How do I resolve this?
MySQL has security tables that determine who is allowed to connect and from what host IP address.
Here's a good article on how to do it:
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
If you have a lot of connections, consider setting up a server to accept the connections and talk to the sql server. The easiest approach to this is to set up a REST interface and use a web server. Web servers are usually also highly optimized and relatively bug free.
In a similar architecture on AWS, I use nginx happily.
Make sure you have bind-address=YOUR-SERVER-IP in my.cnf and make sure you have a user hd1#172.31.39.86 or hd1#%, the latter being a MySQL wildcard on the MySQL server. More information here. You may also need to grant access to port 3306 (the default MySQL port) on the security groups section of the AWS console.
// IN YOUR MYSQL WORKBENCH You Have to Execute below query
CREATE USER 'root'#'1.2.1.5(Your Application Server IP)' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON *.* TO 'root'#'10.200.1.54' WITH GRANT OPTION;
AFTER CREATING YOU CAN VIEW USING BELOW QUERY
SELECT * FROM mysql.user WHERE User = 'root';
I'm having a problem with trying to stablish a database connection with an user that's not root. I mean I have defined the following user at my database.
dev#host
I try to connect the way indicated here: https://developers.google.com/appengine/docs/java/cloud-sql/, but I get a truly strange error, I've set the application to display what error is the one that doesn't allow to connect with that user and I get this:
java.sql.SQLException:Access denied for user 'dev#host'#'localhost'.
I wonder where it can get that localhost from... I've also tried to change the name of the user to dev'#'host but it keeps on the localhost issue.
If I connect with root, not inputting any user or password it connects properly, but I need the application to be connected by users with less privileges.
Any idea what I can be doing wrong?
Thanks for your help.
Check this page…you need to set up permissions…
https://developers.google.com/cloud-sql/docs/access-control?hl=pt
Are you using a mySql client? Did you manage to add an authorized IP address?
Cheers.
Problem
Users from other IPs on the (Windows XP) LAN suddenly cannot connect to my local MySQL server.
Background
I've set up MySQL on my local Windows computer so that other computers on the network have access to the root account. I've added each IP as a host for root. Up to some weeks ago, things worked flawlessly and I could connect to the server programatically and using various MySQL admin tools. Now, however, the MySQL server simply refuses connections from those IPs and I can't figure out why.
The network changes that I've done are: changing network card for two (of three) computers and fiddled around with MySQL settings. None of which should have caused this problem. I've tried adding a new user with all relevant hosts, but I get the same type of error:
MySQL Error number 1045 Access denied
for user 'root'#'shop' (using
passwords: YES)
The odd part is that the computer name, 'shop', is used instead of the IP. I don't know why.
Somehow, IPs seem to be resolved now and hostnames are used. Did you grant access to root#shop? Did you flush privileges?
First thing that pops into mind is Windows Firewall, which could have got re-enabled if you swapped NICs on the host computer.
My next suggestion would be to use a sniffer like Wireshark on the host computer and see what exactly happens packet-wise. You can use filters to make to reduce the output - they're very simple and easy to use. This tool has saved me countless hours of debugging.
-EDIT-
Another possible cause might be that your server somehow decided to resolve IPs to hostnames, in which case ip addresses may no longer work - one would need to add hostnames to the allowed list. Not sure if it works this way for MySQL though.
Could you have turned off TCP connections in MySQL?
Also, is the MySQL port open in your firewall?
If you changed your IP (DHCP?), make sure to correct it in my.cnf if you bound mysqld to your lan ip:
[mysqld]
...
bind-address=192.168.x.y