?
Solved

allow user all privileges to database

Posted on 2014-01-26
3
Medium Priority
?
470 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

752 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