Solved

allow user all privileges to database

Posted on 2014-01-26
3
458 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

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 …
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
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 …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now