MySQL user with ALL PRIVILEGES can login but not run queries - mysql

We've configured our Plesk machine to use an external MySQL server. In doing so, we've granted ALL privileges WITH GRANT OPTION to the psaadmin user so we are able to create remote databases and users just fine. However, the users we create (i.e. 'wordpress_user') cannot run select statements on the remote server.
In checking permissions on the MySQL server, 'wordpress_user' has ALL PRIVILEGES to the database itself. I'm able to login to phpMyAdmin with that user and I'm able to login on the remote server console with that user. It's only when I try to run any query as that user that I get a 'ERROR 1045 (28000): Access denied for user' error.
Everything I've checked seems to indicate the user has full permissions. I've also used FLUSH PRIVILEGES as instructed by the docs. I've restarted Plesk, restarted MySQL, still nothing.
Can anyone help? Please?

I was able to find the problem. Apparently the problematic query was a view that had specific permissions? Regular selects, etc. worked fine (I didn't realize that). I was able to drop and recreate the view and it works great now.

Related

MySQL works only with --skip-grant-tables and can't go away from that. Linux

I was looking on almost every solution which I found on the web, but I still have this issue.
I can connect to mysql (either in terminal or phpmyadmin) when I run --skip-grant-tables, but without it it is totally not working (I am getting 1045 access denied).
I found this: MySQL only works with: skip-grant-tables but I can't run it, because I can only access mysql with --skip grant tables.
Any solutions? I really googled and tried a lot...
from a glance seems it's mysql user permissions problem. if, say, you connect with uname userone, it's just that userone does not have certain permissions on the tables and therefore you have to pass 'skip-grant-tables' option. easiest approach - log as root (admin or whatever god-like-mysql user) and grant your normal user (userone) the missing permissions. See this, there is example under "Account names and password"
http://dev.mysql.com/doc/refman/5.7/en/grant.html

MySQL Installer: Fails at creating user accounts

Currently trying to install and start a MySQL Server on my machine. I'm using the original, actual Installer/Wizard. After filling out all fields, setting a root passwords and also telling to create one user with the password on localhost, the application fails at the step "Creating user accounts".
The log says:
Attempting to Add New MySQL Users Authentication to host 'localhost'
for user 'root' using method 'mysql_native_password' failed with
message: Access denied for user 'root'#'localhost' (using password:
YES) Ended configuration step: Creating user accounts.
Interesting to note, I've done this on a testing device as well as on a fresh virtual machine. I've used different data and names actually, but with the same result >_< What could I be doing principally wrong?
Thanks in advance!
EDIT: Sort of solved... I re-downloaded the database alone and manually created users. Guess that's the better way when being about to learn SQL properly anyways.
That error blocks your installation - although your MySQL server is running - it keeps you from installing the samples and examples. However, if you ignore installing these samples and examples, you can start MySQL Workbench. Moreover, the root account will be available with the password you have set during the install procedure (using Windows). Just launch the Workbench.
I went back to the Accounts and Roles tab> "edit" on my user and my account said I needed a user name> reentered User name> save> next> rename MySQL> Execute== ran fine and finished install.
This was the easy way with all other updates for co-programs done already.
For anyone still having trouble, a simple solution for me was making sure my user names and passwords did not contain special characters such as \ > ~, and so on. Characters such as # and ! should work fine.

Why does SQL foribben to execute SELECT query?

I try to execute query in phpmyadmin and get error:
#1142 - SELECT command denied to user 'cpses_tkdpmnyjWW'#'localhost' for table 'user'
So, user cpses_tkdpmnyjWW'#'localhost is created dynamically and I can not set privileges for this user.
How to fix this?
Use SHOW GRANTS to show your current user privileges. It sounds as though the output may be similar to:
GRANT USAGE ON *.* TO 'Unnamed'#'localhost'
This would mean the account could sign into the server but do little else. This page gives a more detailed breakdown, as you'll see there are quite a few permutations.
The solution is you need to either find an account with more privileges or create/update one.
If the above is not an option, one quick trick I may try is connecting to '127.0.0.1' instead of 'localhost'. In MySQL the source of the connection can form part of the username so it's plausible that connecting on an IP instead of socket if you are on Unix flavoured OS.
Additionally, if you have admin/root access to the server, it is possible to create users when MySQL starts which is very useful in some scenarios.

SUPER user setting not migrated with Tool Transfer in WHM

I tried to transfer a website from one VPS to another using WHM Transfer Tool. Everything went fine except that I got this Warning in the end:
The system failed to grant privileges on the database “galssess_snapshot” to the user “galssess_info” because of an error: The following is not a valid MySQL privilege: SUPER
Any idea how to fix it?
Is there a way to grand this user SUPER privilege via cPanel or WHM?
Login your cpanel with galssess user and update the permission of galssess_snapshot databases through cPanel >> Databases >> MySQL Databases

Mysql query browser (an external program) cant see all databases

I have a database to work with. There is phpMyAdmin and it works good but I want to use an external database manager. I use the same login account what PhP script uses, still query browser doesnt see a database.
Anyone can know why?
I would guess that with phpMyAdmin, you are accessing MySQL from the WebServer that has IP address 1.0.0.1.
Then, from the external DB manager, you are accessing from IP address 1.0.0.2.
MySQL handles authentication and authorization using IP address (among other things) to authorize. So it's probably the case that you don't have all permissions for 1.0.0.2 in your MySQL database.
Your account is probably limited to 'localhost' only, try adding 'user'#'remote-ip' aswell.
For example:
GRANT ALL ON db.* TO 'jsmith'#'office.example.com' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;