Solved

Permissions in MySQL Monitor help.

Posted on 2014-10-18
15
139 Views
Last Modified: 2014-10-26
Hi,  I am trying to create a simple database for class and do not have permission when entering commands in MySQL monitor.  Sure this is simple but having a difficult time.  Can someone assist?  I am using a WAMP localhost on my Win 7 64 bit machine.
0
Comment
Question by:Deanna Andru
[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
  • 8
  • 6
15 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40388962
Are you logged into MySQL with the username/password? If this is a default install then it would be root and empty password.
0
 
LVL 13

Expert Comment

by:AielloJ
ID: 40388973
Deanna Andru:

After you create the database, you have to grant permissions to the tables, and the user(s).  the GRANT command tells it which tables the user has credentials for.  The 'ALL' after the GRANT says the user all privileges on the tables specified after the ON clause.  The <database name>.* indicates the user has these privileges on all tables in the database.

The SET PASSWORD line assigns the password to the username specified.  The term after the @ says from what hostname or IP address the user would be logging in from.  This enables you to allow a user to log in only from certain hostnames or IP addresses.  The '%' in the example below says to let the user log in from any host.

CREATE DATABASE
<database name>;

GRANT ALL ON <database name>.* TO <username> IDENTIFIED BY '<password>';

SET PASSWORD FOR '<username>'@'%' = OLD_PASSWORD('<password>');

Hope this helps.  Best regards,

AielloJ
0
 

Author Comment

by:Deanna Andru
ID: 40389151
I reinstalled WAMP.  When accessing the phpMyAdmin panel I see the following error:
Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'.
At this point, I cant create a database. and I don't know where to find the terminal.
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 58

Expert Comment

by:Gary
ID: 40389156
For local development it's fine to just use root.
If you installed WAMP then it will have installed PHPMyAdmin which you will normally access with
http://localhost/phpmyadmin
(easier than using a terminal)
0
 

Author Comment

by:Deanna Andru
ID: 40389203
Thank you for the assist, I was able to locate the mysql terminal.  The instructions say to begin by typing at the mysql> prompt: mysql -h host -u user -p.  With this I am able to use it.  I am still unsure of the permissions with the error at phpMyAdmin panel:  

"Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'."

Working on the assignment and will update with any issues or errors.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40389207
It's just a warning, to get rid of it set a password on the root account.
0
 

Author Comment

by:Deanna Andru
ID: 40389239
uuuuh.  Ok I did and now not able to access PHPMyAdmin - I take it that was not the right root account...
0
 
LVL 58

Expert Comment

by:Gary
ID: 40389243
You can only have one root account, once you set the password then you will need that to login to MySQL
0
 

Author Comment

by:Deanna Andru
ID: 40389251
ok, I am reinstalling wamp again, any pointers on how to set the password in the init files or how to access to set when installing wamp?
0
 

Author Comment

by:Deanna Andru
ID: 40389255
only one root....  will list when I get back there if more than one.  there were three, one local host, then some others.  I am so glad for the assist :-)
0
 
LVL 58

Expert Comment

by:Gary
ID: 40389256
You don't need to reinstall, just log in using root and the password you set
0
 

Author Comment

by:Deanna Andru
ID: 40389321
Hi again,  I installed XAMP with an admin account on my win 7 64 bit machine this time.   The instructions for the initial setup at the beginning of class was for WAMP, the instructor now shows an example for XAMPP  when accessing phpMyAdmin.  I am a total newbe.   How do I log in using root and the password if I never set a password on the local machine exactly?   I now have XAMPP v3.2.1 installed and am able to follow class instructions precisely - hopefully.  Will check back.
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40389324
If you never set a password during the installation then there is no password - it's blank
0
 

Author Comment

by:Deanna Andru
ID: 40389350
I am able to follow the instructions in XAMPP administrator window for mysql with this setup.  I was able to create a database without any permission issues so far.  :-)
0
 

Author Closing Comment

by:Deanna Andru
ID: 40405464
I was able to log in successfully and create databases with SQL.  Thank you for the assist.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

630 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