Welcome Guest, Not a member yet? Register   Sign In
mySQL privileges
#1

[eluser]scottc[/eluser]
Hi,

Sorry I know this is more of a mySQL question.

I can't get my app to work unless I set up a password for mySQL. When I set the password my app works fine but then I can't login to PHPmyAdmin with seeing this error:

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@localhost (using password: YES)

What am I doing wrong?

Thanks,
#2

[eluser]InsiteFX[/eluser]
Is root@localhost your server name and is the password YES?

It's telling you that the password is wrong. Try lowercase.

Enjoy
InsiteFX
#3

[eluser]scottc[/eluser]
root@localhost is my server. However this is the error I receive when I try to just go the phpmyadmin page. I never even get an opportunity to enter the password wrong.
#4

[eluser]jedd[/eluser]
Web front ends always muddy the water somewhat.

Use the root password you set for the account previously, and login at the command line instead. If there's no password, then you avoid the -p parameter on the command line and it'll log you into what ever account you specify (-u root).

There may be a 'don't bother me about a password' option with phpmyadmin, but I don't know enough about it (and seemingly I'm not the only one).
#5

[eluser]brianw1975[/eluser]
Before any major work goes into figuring the problem out: what OS are you having this problem on? Windows? Linux? More specifically -- which OS is MySQL and PHPMyAdmin installed on that is giving you this problem?

first step -- does mysql present you with a login screen?

Also... you *do* know you shouldn't run a web app with the db user as root right? root has too many privs that web apps don't typically need. PHPMyAdmin asks for Root because it is used to do those things most web apps aren't supposed to do -- just making sure.
#6

[eluser]scottc[/eluser]
Hey Brian,

I'm on MacOSX.5.8.

mySQL does not provide a login screen.

Once unleashed on the world, I will not use root as the user but I figure i can't hurt during development.

Thanks
#7

[eluser]brianw1975[/eluser]
Scott,

Technically MySQL will never show you a log in screen, so I assume that you mean that PHPMyAdmin isn't showing you a log in screen.

In you original post you state:

Quote:I can’t get my app to work unless I set up a password for mySQL. When I set the password my app works fine but then I can’t login to PHPmyAdmin with seeing this error:

So, my suggestion is this: remove the password for root in your mysql server, create a new user for your web app and also set up this same user on your production server, this will be one less change to make when you go live and give you the functionality back in MAMP - which I assume that you are using, OR, we can dig through the PHPMyAdmin code and figure out where to set the password.
#8

[eluser]scottc[/eluser]
OK, for the record. I needed to create a new user (with the proper privileges) and not use root like a fool.

Thanks!
#9

[eluser]brianw1975[/eluser]
Well, fool is too strong of a word, there are times and places to use the root account, like if you were creating an application that would work with and modify multiple databases at the "core" level.

To be honest, I usually set up all of my webapps to use the root account on my dev server (which is on the opposite side of my desk as my regular PC) simply because I don't want to do a lot of managing db users when I have to do that already on my production server.

You seem to have a weird case of your CI insisting of using a password, I don't recall having this issue myself.

But either way, having an account you can use for your web apps that doesn't have all of the privs that root has isn't a bad thing, it's just an additional bit of security for your database.




Theme © iAndrew 2016 - Forum software by © MyBB