You are here:

MySQL/unable to create new user

Advertisement


Question
QUESTION: hi,
i am using mysql 5.6.16. installed from zip folder. i am unable to create new user. "access denied" message is shown. i tried grant all priviliges. but nothing worked for me. I am running under administrator account. but still the problem persists. why I am unable to create a new user, unable to set password for me. please help me.

thanks a lot.

ANSWER: Try :
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;

If problem persists, please send me exact syntax or screenshots.

- Claude Veigas

---------- FOLLOW-UP ----------

unable to create
unable to create  
QUESTION: hi sir,

I checked with the above mentioned statement. but the problem persists.

I have attached image with this reply.
Please assist me.

Thanks a lot

Mohan J

ANSWER: try using the following :
c:\> mysql -uroot -p (Enter)
>

---------- FOLLOW-UP ----------

password already not created by me
password already not c  
QUESTION: I did not create password already. shall I grant all privileges to my current account.  I would like to say one thing is that I can see mysql database using workbench. but I cannot see mysql database in the command prompt

Answer
Please confirm if you tried this :


1. Stop mysqld
2. Restart it with the --skip-grant-tables option
3. Connect to the mysqld server with this command:
shell> mysql

4. Issue the following statements in the mysql client. Replace the password with the password that you want to use.

mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass')
   ->          WHERE User='root';
mysql> FLUSH PRIVILEGES;

MySQL

All Answers


Answers by Expert:


Ask Experts

Volunteer


Claude Veigas

Expertise

Any questions related to MySQL installation, administration and query optimization.

Experience

6 years experience in Mysql.

Publications
Mysql forums

Education/Credentials
BSc - Physics - Electronics

Awards and Honors
NEXT CIO award 2010

©2016 About.com. All rights reserved.