- Enter Safe Mode sudo mysqld-safe--skip-grant-tables--skip-networing
Note: The password entered here is the administrator password for the Ubuntu system
2. Open the new terminal interface Mysql-u root
3. Reset MySQL Password
4. Restart Mysqld
5. Re-login to MySQL mysql-u root-p
Other questions:
Run Safe Mode when prompted mysqld for UNIX socket file ' t exists. The solution
sudo mysqld_safe --skip-grant-tables2017-02-01T16:33:31.382105Z mysqld_safe Logging to syslog.2017-02-01T16:33:31.383942Z mysqld_safe Logging to ‘/var/log/mysql/error.log‘.2017-02-01T16:33:31.386058Z mysqld_safe Logging to ‘/var/log/mysql/error.log‘.2017-02-01T16:33:31.388009Z mysqld_safe Directory ‘/var/run/mysqld‘ for UNIX socket file don‘t exists.
1.service mysql stop 关闭服务器
2.mkdir -p /var/run/mysqld 创建路径3.chown mysql:mysql /var/run/mysqld 获取管理员权限
How to reset your password after installing MySQL in Ubuntu system