Setting up user permissions in mysql

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Setting up user permissions in mysql

Postby karefree » 11. January 2013 23:04

I have set up XAMPP in Win7 and hav mysql running but it says I can't change the password for myself (the user) as I don't have permission to do that. What am I doing wrong? I would really appreciate any help as I'm trying to set this up for a university course and don't have a lot of experience in permissions/mysql. Thanks!
karefree
 
Posts: 3
Joined: 11. January 2013 18:59
Location: Nova Scotia, Canada
XAMPP Version: 5.6.3
Operating System: windows 7

Re: Setting up user permissions in mysql

Postby Altrea » 11. January 2013 23:37

Hi karefree,

A short salutation is an act of politeness. Even if the internet is an virtual area, there is always a human being behind the screen. A polite beginning helps to get polite answers too.

How do you connect to mysql (command line, phpmyadmin, ...)?
Which user do you use to connect?
Which users password do you want to change?
Where do you try to change the password?

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6836
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: Windows 10 Pro x64

Re: Setting up user permissions in mysql

Postby karefree » 12. January 2013 00:03

Sorry for the lack of etiquette, Altrea...and thank you for the reminder...kindness should never be forgotten! :-)

I am connecting through mysql>. I installed XAMPP on my laptop and might not have installed it in the right place or as the administrator?? It is connecting though and I do get some sql commands back from my queries. I'm not sure how I would even log on as admin as I haven't had to do it before...I'm taking a php course and studying how to set up the server through the book "PHP" 3rd edition, Larry Uhlman. I'm trying to follow his instruction: Enter the pathname identified plus "-u username -p" which didnt' work for me..Basically, I'm trying to set up my first username. I have so little knowledge that I'm getting discouraged.. :-( I tried to set the user through this directory: c:\xampp\mysql\bin\myslq and tried to set up password at the same place and got the following message:
Access Denied for user ' ''@'localhost' to database mysql;

Thanks for any help that you can give Altrea!
It is TRULY appreciated!
karefree
karefree
 
Posts: 3
Joined: 11. January 2013 18:59
Location: Nova Scotia, Canada
XAMPP Version: 5.6.3
Operating System: windows 7

Re: Setting up user permissions in mysql

Postby Altrea » 12. January 2013 01:01

karefree wrote:I am connecting through mysql>.
[...]
I'm trying to follow his instruction: Enter the pathname identified plus "-u username -p" which didnt' work for me

Okay, so you are trying to connect through the mysql command line interface (CLI).
What happens if you try to connect like so?:
Code: Select all
C:\xampp\mysql\bin>mysql --user=root --password


karefree wrote:I installed XAMPP on my laptop and might not have installed it in the right place

If XAMPP is installed in C:\xampp\ that is the correct place :D

karefree wrote:Access Denied for user ' ''@'localhost' to database mysql;

Which simply means, that you don't connect correct. You are trying to create a new username with an anonymous user.
That user dowsn't have the permission to create users. You have to connect with the user root which is simply the mysql administrator user.

best wishes,
Altrea

P.S.: If you don't want to follow the tutorial for the lesson of creating a new user, you can even use phpmyadmin, which is simply a php written GUI. For this you have to start your XAMPP Apache application, open a browser window and request the url http://localhost/phpmyadmin/ you will be automatically logged in as root (as far as you don't change the password for the user root).
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6836
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: Windows 10 Pro x64

Re: Setting up user permissions in mysql

Postby karefree » 12. January 2013 03:15

Hi Altrea.

Thank you for the info. I did get it all up and working thanks to your help. I greatly appreciate the assistance!
Take care,
karefree
karefree
 
Posts: 3
Joined: 11. January 2013 18:59
Location: Nova Scotia, Canada
XAMPP Version: 5.6.3
Operating System: windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: jayesh4456 and 63 guests