The solution is as follows:
1. Stop MySQL Service
Net stop MySQL
2. Start MySQL without checking Permissions
Mysqld -- skip-grant-tables
You can see that the cursor in the window is blinking at the first position in the next line,
The root password of mysql on mac is forgotten or the permission is incorrect. In the past few days, mantis found that the connection to mysql is always wrong, and the root permission is changed, causing login failure. The following are the most
1. Stop the MySQL ServiceRun:/etc/init. d/mysql stop, not necessarily/etc/init on your machine. d/mysql may also be/etc/init. d/mysqld 2. skip verification to start MySQL/usr/local/mysql/bin/mysqld_safe -- skip-grant-tables>/dev/null 2> & 1 & note:
1, first stop the running MySQL process
Under Linux, run Killall-term mysqld
Windows, if written as a service can run: net stop MySQL, if not loaded as a service, can be closed directly in the process manager.
2. Start MySQL in safe mode
Under
Method uses the Reset script
The code is as follows
Copy Code
wget Http://xxxx/lnmp/ext/reset_mysql_root_password.sh;sh reset_mysql_root_password.sh
Suitable for LNMP or MySQL admin scripts in/etc/init.d/mysql
CMD switch to MySQL installation directoryCasesD:/mysql/binPrerequisite: The MySQL user root password is empty.Enter Mysql-u root MySQLIn mysql> state enter update user set Password=password (' New password ') where user= ' root ';EchoQuery OK, 0
If you have forgotten the root password locally, try the following methods:
Open cmd first stop MySQL service
net stop MySQL
Enter the Bin folder in the MySQL installation directory and enter
Mysqld-nt--skip-grant-tables
Skip Password detection
I installed million MySQL on the CentOS6.4, unable to enter through the root, because the installation, and did not set the root password, there seems to be an initial random password, but do not remember, too troublesome, directly reset the root
1. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily. Because the MySQL database is completely out of password-protected state during the reset of the root password of MySQL, other users
One of the ways to recover MySQL passwords1. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily. Because the MySQL database is completely out of password-protected state during the reset
1. Win cmd under net stop MySQL stop MySQL service or Task Manager inside End Mysqld-nt.exe process or service inside end MySQL Service>net stop MySQL2. At the command prompt (CMD), go to the MySQL Bin directory and use the command to start MySQL
MySQL version is different, the method of changing passwords is similar, but there are some differences:mysql5.11. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily.2. To modify the
First of all I have to say I am a little two, this can forget .....Method One:#/etc/init.d/mysqld Stop# Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &# mysql-uroot MySQLmysql> Update user Set Password=password (' NewPassword ') where
There are many ways to reset the MySQL password, the official website also provides a very convenient way to operate, can reference resetting permissions. Here are the steps to reset your password in this article:First, stop MySQL (if it is in a
The password is many, sometimes even oneself forgot. This article is a solution to the Windows environment, forget the MySQL database root password.1. First check that the MySQL service is started and stop the service if it is started. Available in
1. Modify the MySQL login settings: # VI/ETC/MY.CNFAdd one sentence to the paragraph in [mysqld]: Skip-grant-tables For example: [Mysqld]Datadir=/var/lib/mysqlSocket=/var/lib/mysql/mysql.sock Skip-grant-tables Save and Exit VI.2. New Start
1. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily.Because the MySQL database is completely password-protected during the reset of the root password of MySQLStatus, other users can
1. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily.Because the MySQL database is completely password-protected during the reset of the root password of MySQLStatus, other users can
The process of modifying the MySQL password is as follows
Baidu search an article to see the use of
Format: Mysqladmin-u username-P Old password password new password
I look at the operation when modified
Enter Password:
Welcome to the MySQL
There are a lot of ways to reset the root password for MySQL, which is described in this article using batch processing
@echo off title MySQL:: Find the MySQL installation path from the registry write file Mysql.txt reg Query
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.