Single user with multiple databases in Plesk 11 - mysql

I am running Centos6 with Plesk 11 and I am trying to assign a single user to have access to multiple databases. I am following the instructions given here: http://kb.parallels.com/en/115783
When I run the command GRANT ALL PRIVILEGES ON newdb.* TO 'olduser'#'%'; from the SQL tab in phpmyadmin, I am getting the following error:
1044 - Access denied for user 'openemm2'#'%' to database 'openemm_cms'
openemm2 is the username I have assigned to this database -- why the error and what can I do about it?

Found the solution to this. I had to log into the mysql> prompt using:
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
This allowed me access to run the command. I have also discovered one can accomplish the same thing through the phpmyadmin panel access through the database servers link from the servers tab in Plesk 11. This is where you find the master phpmyadmin where you can access ALL of your databases rather than the individual access phpmyadmin you get through the database link in the websites & domains tab.

Related

MySQL Workbench Export Privileges

Using MySQL Workbench 6.3, Windows Server 2012 R2.
I have created a user with SELECT privileges on a single database. This user is able to connect to the database and view the records in read only mode.
However I'd also like this user to be able to export the database, currently when they try (via manage > export data) the receive the following error.
'Access Denied for user 'user'#'xxx' (using password NO) when trying to connect'
Basically I only want this user to be able to read the database records and export the database.
Is it possible to add these additional privileges?
Thanks
I had to grant 'LOCK TABLES' then it worked.
if you can't change access, just check this checkbox.

MySQL revoke permissions for external connections

I need to give a remote user access to a MySQL database. I also need to limit the permissions they have to the MySQL database tables. The current database contains approx. 50+ tables so rather than revoke permissions table by table, I'm trying to give the user access with no privileges and then add those that are needed. What I've done appears to work when:
I'm logged in as root (via SSH)
I login using "mysql -u username -p" - enter my password for the newly created user.
This users account honors all the privileges I've set up. However, when this user tried to connect via their desktop client - they can connect but can not view the database. When using "use databasename" they get this error:
Error Code: 1044. Access denied for user 'username'#'%' to database 'database_name'
Not sure if this helps but I'm using Media Temple DV w/ Plesk. I've first added the user. Then I SSH in and revoked ALL privileges. Then I added the privileges for the user and did command "flush privileges". Nothing is working. As I said, if I'm accessing via the command line (after SSHing in as root) the permissions are honored and I can access the database - just not remotely.
Any help would be greatly appreciated.
May be network that is allowed to connect is localhost, but not users network IP.
And check max connections amount.
If you're logged in as root via SSH and MySQL database is on the same machine, then i guess that if you run:
mysql -u username -p
you try to connect to MySQL as 'username'#'localhost' user.
If you want to connect to MySQL database from outside of this server, you need to:
create user like 'username'#'%' which allow to connect to MySQL using 'username' from anywhere ('%')
allow mysql server to connect from outside by setting bind-address more details here

Access denied in creating schema on MySql Cluster

I'm unable to create a schema on freshly set-up MySql Cluster 7.4.7 on single windows machine. It fails with error ERROR 1044 (42000): Access denied for user ''#'localhost' to database 'my_schema'. What is it that I'm missing? During installation I was not asked for username and password for MySql, so what are the defaults?
Also to give detail on how I set-up (in case that is not proper), I following this tutorial and using default settings on new cluster wizard, I have been able to successfully run 2 Multithreaded data node (ndbmtd.exe), 1 Management Node (ndb_mgmd.exe), 2 SQL Node (mysqld.exe). I also stopped mysql server 5.5 running on my machine previously. Then, using command line and typing mysql I'm able to connect and show databases; result in 2 schemas:
information_schema
test
Thanks in advance.
After further trying, I've been able to get away with both the problems above:
Instead of create schema, I used create database and it worked.
By default there is no password. I'm able to connect with user as root without any password.

How could I setup a user to be used with an ODBC in MySQL?

I've stablished an user that will be used for reporting in my Database. I've granted just SELECT privileges over the necessary database.
I'm able to log into MySQL from phpMyAdmin for example and I do with the user what is supposed to do.
However, the following error arises once you try to read from an ODBC:
[MySQL][ODBC 3.51 Driver]Access denied for user user#server_ip (using password: YES)
Do I need to do something extra? The access with root doesn't have this problems but, obviously, I don't want to grant all permissions to that user for security reasons.
You must first make sure that the user has your desired access when it connects locally. You can test this using the MySQL Query Browser or MySQL Command Line client.
Now, if there is no issue when tested locally, and if the root user is able to access the tables from the remote machine, then something must be wrong with the user's permissions which prevents it from accessing the tables from the remote host. Check if you have correctly granted the needed permissions to the user. Here is the correct syntax:
mysql> CREATE USER 'custom'#'host47.example.com' IDENTIFIED BY 'obscure';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
-> ON expenses.*
-> TO 'custom'#'host47.example.com';
See Adding User Accounts in MySQL Reference Manual.

unable to change to different user in mysql

I am also using windows 7.I installed mysql server 5.1.
Created a user as 'user#localhost' using mysql console. But unable to login to that user.
I tried to run using command prompt.
When I created a user with name "user". when i tried mysql -u user -p
It says Access Denied to 'user#localhost' ..
Even trying with mysql console is not helping out here. .
A few things to try:
Make sure your user has the correct privileges set (global or schema level privileges)
try running FLUSH PRIVILEGES
To help us troubleshoot, what does this command return? SHOW GRANTS FOR 'user'#'localhost';