Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
 Post subject: Adding user to MySQL
PostPosted: Wed Mar 07, 2012 7:39 pm 
Offline
A regular
A regular

Joined: Fri May 20, 2011 3:01 pm
Posts: 35
Heya. I just put phpMyAdmin up to check up on the databases for the wiki and web bans system I have running on my webspace. Though, it says to enable extended functions and saving preferences, I need to make another SQL user that has limited privileges to a seprate DB. Well, I made one, tntspacebuild_phpmyadmin, and tried to run this series of queries on it:

Code:
GRANT USAGE ON tntspacebuild_phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY '[redacted]';
GRANT SELECT (
    Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
    Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
    File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
    Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
    Execute_priv, Repl_slave_priv, Repl_client_priv
    ) ON tntspacebuild_phpmyadmin.user TO 'pma'@'localhost';
GRANT SELECT ON tntspacebuild_phpmyadmin.db TO 'pma'@'localhost';
GRANT SELECT ON tntspacebuild_phpmyadmin.host TO 'pma'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
    ON tntspacebuild_phpmyadmin.tables_priv TO 'pma'@'localhost';


However, it throws this on the first line:
#1044 - Access denied for user 'tntspacebuild'@'localhost' to database 'tntspacebuild_phpmyadmin'

It happens both in phpMyAdmin, and in the mysql CLI program from SSH. I'm not too handy with SQL, I might just be being a derp, thought it seems like my user can't make other users. Is this the case, and should I just plug in the tntspacebuild user into the config storage field?

What I'm trying to do: http://www.phpmyadmin.net/documentation/#linked-tables


Top
 Profile  
 
 Post subject: Re: Adding user to MySQL
PostPosted: Wed Mar 07, 2012 8:11 pm 
Offline
Staff
Staff
User avatar

Joined: Thu Jul 22, 2004 12:24 am
Posts: 1028
Location: Big Bear, CA
On our web hosting, creating databases from inside phpmyadmin and the like will not work, they can only be created from the "Databases" page in the control panel, and all are set to the same user.

_________________
TimeX


Top
 Profile  
 
 Post subject: Re: Adding user to MySQL
PostPosted: Wed Mar 07, 2012 8:41 pm 
Offline
A regular
A regular

Joined: Fri May 20, 2011 3:01 pm
Posts: 35
Well, yeah, the DB already exists, it's tntspacebuild_phpmyadmin. It was made with the CP.

If it were creating a DB it would have something like "CREATE DATABASE IF NOT EXISTS `tntspacebuild_phpmyadmin`" in it.

phpMyAdmin can connect to it fine, I can see the tables I imported into it, but it's just that GRANT does not work.


Top
 Profile  
 
 Post subject: Re: Adding user to MySQL
PostPosted: Wed Mar 07, 2012 8:46 pm 
Online
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9236
Location: Seattle
GRANT requires administrative privileges, which you do not have, so it should always fail.

We only allow one MySQL user per website account currently.


Top
 Profile  
 
 Post subject: Re: Adding user to MySQL
PostPosted: Wed Mar 07, 2012 8:57 pm 
Offline
A regular
A regular

Joined: Fri May 20, 2011 3:01 pm
Posts: 35
Alright, fine with me. Just wanted to know why it was failing. It's not totally essential to have the extended features in phpMyAdmin, I mainly use it for imports anyway.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Wed May 22, 2013 2:47 pm
Powered by phpBB® Forum Software © phpBB Group