Cant seem to get shell to login to mysql

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

Cant seem to get shell to login to mysql

Postby empresive » 17. October 2009 03:46


I was hoping someone here can help me with a problem im having now with xampp 1.7.2 which seems a lot of people are. My problem is when using shell command to login to mysql it wont allow me to use any username.

Example: I type in mysql> -username=root -p=testing but when i hit enter it gives me permission denied for ODBC using password yes, and cant seem to get it to use root.

I had installed 1.7.2 before and it worked fine but some php scripts wasnt working correctly on 1.7.2 so i went back to 1.7.1 but i like the features of 1.7.2 so i went back with it and now i get this problem. I tried a lot of things to get it working but no luck and i search all over this forum and other sites but no were is there a fix for this problem that i can find.

I looked in the phpmyadmin/ i think it is and but the password for room in there as well but still the same, i already setup the password for root and im able to login to phpmyadmin just fine but cant access it from shell. Does anyone have a idea why this is happening, any help would be great.

Posts: 2
Joined: 17. October 2009 03:36

Re: Cant seem to get shell to login to mysql

Postby Izzy » 17. October 2009 04:54

empresive wrote:Example: I type in mysql> -username=root -p=testing
Try this first:
Click on the Shell button in the XAMPP Control Panel but first make sure Apache and MySQL are running.

At the shell prompt # type:
mysql -u root -p
Hit return
You should now be prompted to enter a password.
Simply don't enter a password but hit enter and see if you get the mysql> prompt.

If the above works and you get access then delete the password testing from the file and follow the correct instructions to set the passwords in the readme_en.txt file under Security a must read or similar wording - like so... go to http://localhost/security/ or click on the Security link in the Admin... page from the button in the XCP and follow the link to set your root user password for mysql and phpMyAdmin and also select cookie authentication, then click on Password Changing button.

Then restart MySQL.

Make sure you allow cookies for localhost then test phpMyAdmin http://localhost/phpmyadmin and enter username root and the password testing for access.

Now repeat your Shell access attempt by typing:
mysql -u root -p
Type your password when prompted and hit enter.
You should now have access both via phpMyAdmin and via Shell.

By the way to remove the password from MySQL and phpMyAdmin so XAMPP is back to the default of no password simply double click on the \xampp\mysql\resetroot.bat file.

Good luck.
Posts: 3344
Joined: 25. April 2006 17:06

Re: Cant seem to get shell to login to mysql

Postby empresive » 17. October 2009 05:43

Thanks Izzy for the reply, but in my case the password or anything wasnt the problem. I just figured it out and turned out to be nothing to do with xampp but the xampp folder. Not why but it wasnt installing with the right folder permissions for users of my pc and so on... After checking out the permissions i noticed the my pc user didnt have any permission to the folder which was why i wasnt able to use shell to connect to mysql.

Thanks Again Izzy, for the reply though and trying your best to help you rock.
Posts: 2
Joined: 17. October 2009 03:36

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 40 guests