-1

I did something pretty stupid and lost my database user and password.I want to edit a file on server with notepad++,but of course i must provide user and pass to access the server-editing the connection(also in that file i am trying to access-index.php-i would have these data to connect to database).I tried using table inspector on that file(an application) but it doesn't show php code(where i have my database connection user and pass) only html code.Editing the path to the file in notepad++ also show only html code in a "index[1].php" file.Is there any way to retrieve my user and pass?I know it seems like hacking,but i'm just trying to access my own files and my own mysql database

  • 2
    What's losing a database password got to do with editing a file on a server? – sg- Mar 17 '15 at 11:26
  • possible duplicate of [How to reset mysql root password?](http://stackoverflow.com/questions/4258124/how-to-reset-mysql-root-password) – kenorb Mar 17 '15 at 11:47
  • Possible duplicate of [MySQL: can't access root account](https://stackoverflow.com/questions/641984/mysql-cant-access-root-account) – kenorb Sep 13 '17 at 19:52

1 Answers1

0

if your own database server. stop database. and start database with skip-grant-tables option. contain this option to your my.cnf(or my.ini). now you can access your database without username and password. then reset your account and restart database server without skip-grant-tables option

huhushow
  • 537
  • 4
  • 13