I recently learned about Linux, plus the current notebook is a Mac, self-class Linux command and file system management, so try to use the root account, but a few months ago to initialize the root account password, now found to forget the root password, All kinds of information on the Internet to try to reset the
, download the mysql-python-1.2.3.tar.gz file. (large windows directly Mysql-python-1.2.3.win32-py2.7.msi installation) After the Finder directly double-clicks the tarball or $tar ZXVF unzip, open the Site.cfg file inside to find this line:
1
#mysql_config = /usr/local/bin/mysql_config
Modify the location of your actual installed MySQL, you can $cd all the way. To see, mine is:
1
mysql_config = /usr/local/mysql/bin/mysql_config
How can I forget the root password for MySQL5.7 on Mac? mysql5.7root
Follow these steps to forget the root password of mysql5.7:
1. Stop the MySQL service in the system preference settings.
2. Run the following command to start MySQL in safe mode:
Cd/usr/local/mysql/bin
Sudo./mysqld_safe -- skip-grant-tables
3. Open a new command line window and execute
Label:1. Turn off the MySQL service, turn on the system setup last MySQL, then turn off MySQL first2. Generate a file named Mysql-init, put in the file: a sentence, this sentence different version, the following: (not included in parentheses)Alter user ' root ' @ ' localhost ' identified by ' new password '; (MySQL 5.7.6 and later)Set password for ' root ' @ ' localhost ' =password (' new password ');(MySQL
MySQL installed by brew, as if automatically updated onceThen execute mysql_secure_installation again, enter the root password error, reload MySQL or notError:access denied for user ' root ' @ ' localhost ' (using Password:yes)The reason is that the previously installed MySQL configuration file was not completely erasedReference Http://stackoverflow.com/questions/4359131/brew-install-mysql-on-
Label:MAC OS X-Reset MySQL Root passwordHave you forgotten the root password of MySQL for Mac OS? You can reset your new password by following 4 steps:1. Stop MySQL server. Usually in ' System Preferences ' > MySQL > ' Stop mysql Server '2. Open the terminal and enter:Sudo/usr/local/mysql/bin/mysqld_safe--skip-grant-tables3. Open another new terminal and enter:Su
Tags: service alter flush tables 5.7 where ges localhost divStop MySQL service first // Stop table Permissions
cd/usr/local/mysql/bin/
. /mysqld_safe--skip-grant-tables Direct MySQL into the database set authentication_string=password ('newpassword'where user=' root'localhost';Flush Privileges Any action will prompt you when you enter the database with the new password: 1820 using this statement.You must reset your password by using the ALTER USER statement before performing this Perform:
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.