お世話になります
下記のエラーに対処できません。
Mac10.12.5
vagrant1.9.5
centos7.2です
下記のエラーが出て接続できない
[vagrant@localhost ~]$ mysqld --version
mysqld Ver 5.6.36 for Linux on x86_64 (MySQL Community Server (GPL))
[vagrant@localhost ~]$ systemctl enable mysqld
mysqld.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig mysqld on
この操作を実行するためには権限が十分ではありません。
[vagrant@localhost ~]$ systemctl start mysqld
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password: Failed to start mysqld.service: 接続がタイムアウトしました
[vagrant@localhost ~]$ polkit-agent-helper-1: pam_authenticate failed: Authentication failure
^C
[vagrant@localhost ~]$ ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to stop mysqldsystemctl.service: Access denied
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to stop stop.service: Access denied
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password: Failed to stop mysqld.service: 接続がタイムアウトしました
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
[vagrant@localhost ~]$ ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to stop mysqldystemctl.service: Access denied
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
[vagrant@localhost ~]$ ログアウト
Connection to 127.0.0.1 closed.
moriuchi:MyCentOS7.2 mtg-1$ vagrant ssh
Last login: Sat Jun 3 15:41:21 2017 from 10.0.2.2
[vagrant@localhost ~]$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[vagrant@localhost ~]$ ps ax | grep mysql
7413 pts/0 R+ 0:00 grep --color=auto mysql
[vagrant@localhost ~]$ vi my.cnf
[vagrant@localhost ~]$
[vagrant@localhost ~]$ service mysqld start
Starting mysqld (via systemctl): ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to start mysqld.service: Access denied
[失敗]
[vagrant@localhost ~]$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[vagrant@localhost ~]$ /etc/init.d/mysqld start
Starting mysqld (via systemctl): ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
** (pkttyagent:7458): ERROR **: Got unexpected EOF while reading from controlling terminal.
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
Failed to start mysqld.service: Access denied
[失敗]
※ ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
※Authentication is required to manage system services or units.
Authenticating as: root
Password:
解決方法がわかりません

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/04 00:43