Server Apache2
Tofloor
poster avatar
snowcley
deepin
2017-12-14 12:59
Author
Hello people. So I installed a few days ago the apache2 server through the command apt-get install apache2 mysql-server php5 php5-mysql libapache2-mod-php5, I put a password, I do not remember it. I tried uninstalling and installing it again, it does not work, it does not appear but the screen to install apache2, it just unpacks apache2 and makes some settings, but it does not come with the installation interface that came before. Soon I can not put another password, so I can not use it.
Reply Favorite View the author
All Replies
138******09
deepin
2017-12-14 16:19
#1
the apache2 & php5  does not need to set a password。maybe you forgot  mysql's password。
Reply View the author
snowcley
deepin
2017-12-15 11:08
#2
Eu defini uma senha na primeira vez que instalei, agora quando desinstalo e instalo de novo não vem a tela de instalação, logo, não posso deixar sem senha ou definir uma nova senha, apenas instala e não vem a tela, dai na hora que tento iniciar uma conexão com o Mysql-Workbench pede uma senha, ja tentei iniciar sem esta senha e não da certo. E já desinstalei e instalei de novo o Mysql-workbench e o Apache2 e nada. Deve que a senha ta armazenado em algum arquivo cache, ou em um arquivo que em desinstalar o programa em si, não exclui ele, logo quando instala, já vem com as configurações deste arquivo. Por favor alguém me ajude !

I set a password the first time I installed it, now when I uninstall it and install again it does not come to the installation screen, so I can not leave without a password or set a new password, just install and not come to the screen, hence the time I try start a connection with Mysql-Workbench asks for a password, I tried to start without this password and not right. And I've already uninstalled and reinstalled the Mysql-workbench and Apache2 and nothing.It should be that the password is stored in some cache file, or in a file that in uninstalling the program itself, does not delete it, so when it installs, it already comes with the settings of this file. Please someone help me!
Reply View the author
138******09
deepin
2017-12-15 17:10
#3
the way of reset mysql password,or you can get another way by google:
1,Stop MySQLd
  1. sudo /etc/init.d/MySQL stop
Copy the Code

2,reboot MySQL
  1. MySQLd --skip-grant-tables &
Copy the Code

3,login Mysql without password
  1. MySQL -u root
Copy the Code

4,update root password

  1. MySQL> update MySQL.user set password=PASSWORD('newpassword') where User='root';  
  2. MySQL> flush privileges;  
  3. MySQL> quit;
Copy the Code

5,reboot mysql
Reply View the author
snowcley
deepin
2017-12-18 05:37
#4
O segundo comando não funcionou, ou seja desse jeito que tu mandou não deu certo, mas eu consegui, desinstalando com --purge todos os programas relacionado com o apache2 e mysql. Exemplo:
sudo apt-get remove --purge apache2*
sudo apt-get remove --purge mysql*
sudo apt-get remove --purge php5*
e depois eu instalei de novo, dai veio a tela de instalação que configura a senha do mysql de novo.
sudo apt-get install apache2 mysql-server php5 php5-mysql libapache2-mod-php5
Reply View the author