PhpMyAdmin ... lost login details
Posted by: ProBowlUK (---.15-3.cable.virginm.net)
Date: February 16, 2014 02:05AM

It has been so long since I used to Wamp controls, have forgotten the login details.

How do I get access to the MySQL database details ?

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: RiggsFolly (---.as13285.net)
Date: February 16, 2014 02:22AM

1. Stop the mysql service
wampmanager -> MySQL -> Service -> Stop Service

2. Edit the my.ini file
wampmanager -> MySQL -> my.ini

3. Find the [wampmysqld] section in the ini file
Add this line directly after the section [wampmysqld]
skip-grant-tables

4. Restart the mysql service.
wampmanager -> MySQL -> Service -> Start/Resume Service

5. Open the MySQL console
wampmanager -> MySQL -> MySQL Console

6. Now we are going to reset the password for the root user, of course this could be used to reset any users password.

enter the following 2 commands at the mysql> command prompt, each with a semi colon at the end of a line, and press ENTER after each line to issue the command to mysql.
   UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
   FLUSH PRIVILEGES;

Note that the update should report that it has updated more than one row, that because there are actually 3 user accounts with the userid of 'root' each with a different domain i.e. 127.0.0.1, localhost and ::1

7. Now enter 'quit' at the mysql command promt to exist mysql.

8. Stop the mysql service
wampmanager -> MySQL -> Service -> Stop Service

9. Edit the my.ini file
wampmanager -> MySQL -> my.ini

10. Find the [wampmysqld] section in the ini file
Remove the 'skip-grant-tables' parameter we added earlier.
DO NOT Leave this parameter in the ini file its a HUGH security hole.

11. Restart the mysql service.
wampmanager -> MySQL -> Service -> Start/Resume Service

You shoud now be able to login with phpmyadmin using the userid 'root' and the new password you have just set for that user.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 02/17/2014 06:05PM by RiggsFolly.

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: ProBowlUK (---.15-3.cable.virginm.net)
Date: February 16, 2014 03:28AM

Only got as far as step 5 ...


C:\>cd wamp

C:\wamp>cd bin\mysql\mysql5.5.16\bin

C:\wamp\bin\mysql\mysql5.5.16\bin>mysql.exe
'mysql.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\wamp\bin\mysql\mysql5.5.16\bin>

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: ProBowlUK (---.15-3.cable.virginm.net)
Date: February 16, 2014 09:14AM

oops !

mysql5.5.16 is an old version that was on;y paqrtly uninstalled.

Working with mysql5.6.12

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: ProBowlUK (---.15-3.cable.virginm.net)
Date: February 16, 2014 09:38AM

OK completed that


But the database I am using on my subscribed server (copies of .sql and .csv in my (LocalHost) copy of the website) is not showing in the list of schemers.

How do I ADD that database to my PHPmyAdmin ?

Should I extract new .csv / .sql copies of the database from the live website, using the Server's Control Panel.



cheers

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: yamen-nassif (---.mada.jo)
Date: February 16, 2014 04:42PM

Hello and thanks in advance
when i reached the update command
this error occurred
error 1142 (42000): Update command denied for user ''@'localhost' for table 'user'

well i know its some privileges issue but i can't fix it
any help?

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: Otomatic (Moderator)
Date: February 16, 2014 06:34PM

Hi,

@RiggsFolly For step 5, instead open a command window, we can use the MySQL Console directly from WampServer -> MySQL -> MySQL Console. It works very well. Just type Enter at Password prompt.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: RiggsFolly (---.as13285.net)
Date: February 16, 2014 11:33PM

@Otomatic That will not work if they have set a password on 'root' and then forgotten it. Which is the point of this port.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: Otomatic (Moderator)
Date: February 17, 2014 05:21PM

Hi,

It works perfectly with the use of MySQL Console with my WampServer. Of course, until FLUSH PRIVILEGES.

MySQL documentation:

skip-grant-tables

This option causes the server to start without using the privilege system at all, which gives anyone with access to the server unrestricted access to all databases. You can cause a running server to start using the grant tables again by executing mysqladmin flush-privileges or mysqladmin reload command from a system shell, or by issuing a MySQL FLUSH PRIVILEGES statement after connecting to the server.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: RiggsFolly (---.as13285.net)
Date: February 17, 2014 06:02PM

Oh yes of course it would. Silly me.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: Otomatic (Moderator)
Date: February 17, 2014 06:14PM

RiggsFolly Wrote:
-------------------------------------------------------
> ... Silly me.
No! winking smiley Is that it is much more simple and easy to use MySQL Console that is available and accessible to all Wampserver users, while very few users know what is a command window, moreover, it (cmd.exe) must be run as administrator.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: PhpMyAdmin ... lost login details
Posted by: RiggsFolly (---.as13285.net)
Date: February 17, 2014 06:24PM

Yes, I totally agree.

For some reason I was just ignoring the obvious and more simple.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.