How to reset your password after installing MySQL in Ubuntu system

Source: Internet
Author: User
Tags mysql in administrator password

    1. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.