Solved

allow user all privileges to database

Posted on 2014-01-26
3
462 Views
Last Modified: 2014-01-27
I am using sql query editor mysql workbench

$this->_connection = new mysqli('localhost', 'sandbox', 'sandbox', 'sandbox');

I am doing a tutorial
so I want to allow username sandbox to database sandbox on localhost on mysql on windows


please make sandbox have all privileges to all databases on localhost

I can log on to mysql workbench as sandbox
but can not view sandbox database (created with user: root) as user: sandbox

I also tried with a php script and can not view sandbox

please make sandbox have all privileges to all databases on localhost please make sandbox have all privileges to all databases on localhost
0
Comment
Question by:rgb192
3 Comments
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 500 total points
ID: 39811129
You have to execute the below command to give full rights to the user on database,

grant all privileges on DATABASE_NAME.* to USERNAME@localhost identified by 'PASSWORD';

Open in new window


example,  so as per your db

grant all privileges on sandbox.* to sandbox@localhost identified by 'PASSWORD';

flush privileges;

Open in new window


more details,
http://dev.mysql.com/doc/refman/5.1/en/grant.html#grant-database-privileges
0
 
LVL 15

Expert Comment

by:Insoftservice
ID: 39811166
Try out this one .

GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

FLUSH PRIVILEGES;
0
 

Author Closing Comment

by:rgb192
ID: 39812157
first to answer thanks
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Mysqli Query 5 51
Multilanguage Database Design in MySQL 5 112
running code or pseudo code of table structure 5 26
MySQL Query Using Up Memory 6 30
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikipedia.org/wiki/PHP  Very powerful.  But a…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question