Как реконфигурировать не полностью установленный MySQL?

Возможно, я сделал плохую ошибку, когда установленный MySQL и заканчивается как это.

ПРОБЛЕМА

Пакет MySQL не полностью installed.this, то, что я получил

  1. sudo service mysql start ничего не делает
  2. mysql -u root вывод: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  3. aptitude search mysql |grep ^i

вывод:

i   mysql-client                    - MySQL database client (metapackage dependi
I A mysql-client-5.7                - MySQL database client binaries            
I A mysql-client-core-5.7           - MySQL database core client binaries       
I A mysql-common                    - MySQL database common files, e.g. /etc/mys
I   mysql-server                    - MySQL database server (metapackage dependi
I A mysql-server-5.7                - MySQL database server binaries and system 
I A mysql-server-core-5.7           - MySQL database server binaries            
I   php-mysql                       - MySQL module for PHP [default]            
I A php7.0-mysql                    - MySQL module for PHP

И ЗАТЕМ

Я пытаюсь переустановить его с sudo apt-get install mysql-server-5.7 --reinstall и это - то, что я получил

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 27 not upgraded.
Need to get 0 B/2.708 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 254676 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.20-0ubuntu0.16.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.20-0ubuntu0.16.04.1) over (5.7.20-0ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
^[[B^[[B^[[B^[[B^[[B^[[BProcessing triggers for systemd (229-4ubuntu17) ...
^[[B^[[B^[[BProcessing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Setting up mysql-server-5.7 (5.7.20-0ubuntu0.16.04.1) ...
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я также пробую dpkg но не работа. Я хочу сервер MySQL, выполненный, как это было.

Извините за мою плохую запись и английский язык просто не мой родной язык. Спасибо :)

0
задан 22 November 2017 в 21:39

1 ответ

Вы можете просто запустить эти команды для очистки всех MySQL связанных пакетов:

sudo apt-get remove --purge * mysql * sudo apt-get autoremove sudo apt-get autoclean

и:

sudo apt-get установить mysql-сервер mysql_secure_installation

для правильной установки MySQL .

0
ответ дан 22 November 2017 в 21:39

Другие вопросы по тегам:

Похожие вопросы: