attaboy Posted February 12, 2012 Share Posted February 12, 2012 I'm using Wampserver 2.2 when I click on the link for mySql console it comes up under root. I created a user but I don't see any way to log in as that user. I also try using phpmyadmin there I can logout and I'm presented with a login box if I enter the credentials of the new user it just presents the box over again and won't let me back in till I enter root. Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/ Share on other sites More sharing options...
The Little Guy Posted February 13, 2012 Share Posted February 13, 2012 show grants for USERNAME; Replace USERNAME with the user. What does it display? Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/#findComment-1317444 Share on other sites More sharing options...
attaboy Posted February 13, 2012 Author Share Posted February 13, 2012 mysql> show grants for Jim; +------------------------------------------------------------------------------- ------------------------------------------------+ | Grants for Jim@% | +------------------------------------------------------------------------------- ------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'Jim'@'%' IDENTIFIED BY PASSWORD '*D84E02E1F52C 3CFB308DB32A53E53DAB7AE48348' WITH GRANT OPTION | +------------------------------------------------------------------------------- ------------------------------------------------+ 1 row in set (0.01 sec) mysql> Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/#findComment-1317481 Share on other sites More sharing options...
gizmola Posted February 13, 2012 Share Posted February 13, 2012 Are you sure you are logging in as "Jim" and not "jim"? You might also have a password issue. Try resetting it to something simple like this: GRANT ALL ON *.* TO 'Jim'@'%' IDENTIFIED BY 'apple'; Then try to login, and if that works, take another pass setting your password back to what you want it to be. If this is a wamp test/development server, I'm not sure why it would matter much, as having a strong password isn't important when the server can't be accessed by anyone but you. Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/#findComment-1317488 Share on other sites More sharing options...
attaboy Posted February 13, 2012 Author Share Posted February 13, 2012 'Then try to login,' that's a problem when I bring up the MySql console it doesn't ask me for a user name, the user is already root and it just wants my password. From what I gather there is no login command so is there a ini file I should change? Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/#findComment-1317493 Share on other sites More sharing options...
gizmola Posted February 13, 2012 Share Posted February 13, 2012 'Then try to login,' that's a problem when I bring up the MySql console it doesn't ask me for a user name, the user is already root and it just wants my password. From what I gather there is no login command so is there a ini file I should change? Right. Phpmyadmin is just a php script that gives you a web interface to your mysql. This page talks about the configuration file: http://wiki.phpmyadmin.net/pma/Config. Wampserver is simply a bundle with things configured in advance to make it simple for you. You'll have to analyze the config.inc.php file to see what they've done. Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/#findComment-1317498 Share on other sites More sharing options...
The Little Guy Posted February 13, 2012 Share Posted February 13, 2012 Instead of using the wamp console, use the CMD Start > Run > cmd then type: mysql -u Jim -p [databasename (optional)] The above will connect you to localhost, then prompt you to enter a password, if it is correct you will then be logged into the console. the database (in the brackets is optional, it will default you to a database). Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/#findComment-1317760 Share on other sites More sharing options...
attaboy Posted February 13, 2012 Author Share Posted February 13, 2012 It seems wamp runs this as a service so it can't be reached from the command line. It's not that important all I'm doing is taking a class and I can do all I need as root. Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/#findComment-1317909 Share on other sites More sharing options...
The Little Guy Posted February 13, 2012 Share Posted February 13, 2012 mysql always runs as a service, that shouldn't matter. If it wasn't running you couldn't connect to mysql. Quote Link to comment https://forums.phpfreaks.com/topic/256970-i-can-only-login-as-root/#findComment-1317922 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.