LINUX.ORG.RU
ФорумAdmin

Не могу сбросить MySQL root password

 ,


0

1

Добрый день.

Centos7.2 + MySQL.

# service iptables stop
Redirecting to /bin/systemctl stop  iptables.service

# service iptables status
Redirecting to /bin/systemctl status  iptables.service
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Tue 2016-04-12 10:14:09 MSK; 5s ago
  Process: 27578 ExecStop=/usr/libexec/iptables/iptables.init stop (code=exited, status=0/SUCCESS)
  Process: 742 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
 Main PID: 742 (code=exited, status=0/SUCCESS)

Apr 12 10:14:09 dc systemd[1]: Stopping IPv4 firewall with iptables...
Apr 12 10:14:09 dc iptables.init[27578]: iptables: Setting chains to policy ACCEPT: filter [  OK  ]
Apr 12 10:14:09 dc iptables.init[27578]: iptables: Flushing firewall rules: [  OK  ]
Apr 12 10:14:09 dc iptables.init[27578]: iptables: Unloading modules: [  OK  ]
Apr 12 10:14:09 dc systemd[1]: Stopped IPv4 firewall with iptables.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

# mysqladmin -u root password mysqlwelcome22
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

И тут я подвис... Как дальше быть? ))


systemctl stop mysqld
mysqld_safe --skip-grant-tables &
mysql -u root
use mysql;
update user set password=PASSWORD("новыйпароль") where User='root';
flush privileges;
quit
systemctl start mysqld
mysql -u root -p


вводим «новыйпароль».

gssomi ★★ ()
Ответ на: комментарий от SevikL

Извиняюсь, нет, не запущен.

# service mysqld start
Redirecting to /bin/systemctl start  mysqld.service
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

# systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Tue 2016-04-12 10:36:34 MSK; 38s ago
  Process: 28636 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
  Process: 28618 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 10739 (code=killed, signal=KILL)

Apr 12 10:36:34 dc systemd[1]: Failed to start MySQL Server.
Apr 12 10:36:34 dc systemd[1]: Unit mysqld.service entered failed state.
Apr 12 10:36:34 dc systemd[1]: mysqld.service failed.
Apr 12 10:36:34 dc systemd[1]: mysqld.service holdoff time over, scheduling restart.
Apr 12 10:36:34 dc systemd[1]: start request repeated too quickly for mysqld.service
Apr 12 10:36:34 dc systemd[1]: Failed to start MySQL Server.
Apr 12 10:36:34 dc systemd[1]: Unit mysqld.service entered failed state.
Apr 12 10:36:34 dc systemd[1]: mysqld.service failed.

]# journalctl -xe
--
-- Unit mysqld.service has failed.
--
-- The result is failed.
Apr 12 10:36:34 dc systemd[1]: Unit mysqld.service entered failed state.
Apr 12 10:36:34 dc systemd[1]: mysqld.service failed.
Apr 12 10:36:38 dc NetworkManager[718]: <error> [1460446598.932740] [rdisc/nm-lndp-rdisc.c:68] send_rs(): (eno
Apr 12 10:36:42 dc NetworkManager[718]: <error> [1460446602.924871] [rdisc/nm-lndp-rdisc.c:68] send_rs(): (eno
Apr 12 10:36:46 dc NetworkManager[718]: <error> [1460446606.925018] [rdisc/nm-lndp-rdisc.c:68] send_rs(): (eno
Apr 12 10:36:50 dc NetworkManager[718]: <error> 

...

В логах за сегодня почему-то пусто.

zuxla ()
Ответ на: комментарий от SevikL
# mysqld
2016-04-12T08:02:38.071743Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-04-12T08:02:38.165942Z 0 [Note] mysqld (mysqld 5.7.11) starting as process 30047 ...
2016-04-12T08:02:38.230684Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2016-04-12T08:02:38.230712Z 0 [ERROR] Aborting

2016-04-12T08:02:38.230729Z 0 [Note] Binlog end
2016-04-12T08:02:38.230785Z 0 [Note] mysqld: Shutdown complete
zuxla ()
Ответ на: комментарий от zuxla
# journalctl -u mysqld.service
-- Logs begin at Mon 2016-04-11 10:26:18 MSK, end at Tue 2016-04-12 11:04:17 MSK. --
Apr 12 10:36:28 dc systemd[1]: Starting MySQL Server...
Apr 12 10:36:34 dc mysqld[28636]: Initialization of mysqld failed: 0
Apr 12 10:36:34 dc systemd[1]: mysqld.service: control process exited, code=exited status=1
Apr 12 10:36:34 dc systemd[1]: Failed to start MySQL Server.
Apr 12 10:36:34 dc systemd[1]: Unit mysqld.service entered failed state.
Apr 12 10:36:34 dc systemd[1]: mysqld.service failed.
Apr 12 10:36:34 dc systemd[1]: mysqld.service holdoff time over, scheduling restart.
Apr 12 10:36:34 dc systemd[1]: start request repeated too quickly for mysqld.service
Apr 12 10:36:34 dc systemd[1]: Failed to start MySQL Server.
Apr 12 10:36:34 dc systemd[1]: Unit mysqld.service entered failed state.
Apr 12 10:36:34 dc systemd[1]: mysqld.service failed.
Apr 12 10:47:34 dc systemd[1]: Starting MySQL Server...
Apr 12 10:47:36 dc systemd[1]: mysqld.service: control process exited, code=exited status=1
Apr 12 10:47:36 dc systemd[1]: Failed to start MySQL Server.
zuxla ()
Ответ на: комментарий от snaf
]# cat /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

character-set-server = utf8
collation-server = utf8_unicode_ci
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
skip-character-set-client-handshake
lower_case_table_names = 1
zuxla ()
Ответ на: комментарий от zuxla

ловера рубани, затем айпиви6 пропиши.

anonymous ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.