What if you forget the root password of the online MySQL database one day? 1. Close the MySQL database. mysqladmin cannot use the root password because it is forgotten. In this case, killpid can only be used to close the program. What if you forget
Important directories of Linux MySQL
1. Database directory/Var/lib/mysql/2. Configuration File/Usr/share/mysql (mysql. server command and configuration file)3. Related commands/Usr/bin (commands such as mysqladmin mysqldump)4. Start the
1. Stop the running MySQL process
In Linux, run killall-term mysqld
In Windows, if it is written as a service, you can run: net stop mysql. If it is not loaded as a service, you can directly close it in the Process Manager.
2. Start MySql in
First we want to enter your MySQL server, use net stop mysql to stop MySQL, and then run the DOS command, enter CMD in the run, and then switch to the MySQL bin directory, run the command:
The code is as follows
Copy Code
Solutions
Method One
1. Stop MySQL Service
Start-> run cmd, enter net stop MySQL at the command prompt window
2, switch the current directory to the MySQL installation path under the Bin directory
such as: CD C:mysql5bin
3, set no password
About How to modify the MySQL tutorial root password We have listed a lot of changes on the mysql password , okay crap don't say much more we look at these days to modify the root password effective means and methods.Method One
Using the PHP
1, the installation of good Wamp, run the Wampserver program, into the MySQL console;
2, enter the console, prompted to enter the password (do not enter any password, because the password is empty), press ENTER enter;
3, input "use MySQL;" Then
I'll take a few examples and I'm sure I'll get it soon.1, the original password is 123456C:>type Mysql5.bat@echo offmysql-uroot-p123456-p3306The correct format for modifying the MySQL user password is:We use it here.User: root (can be replaced by
Use root from any host, password: youpassword (your root password) to connect to the MySQL server:
# mysql-u Root-prootMysql>grant all privileges in *.* to ' root ' @ '% ' identified by ' Youpassword ' with GRANT OPTION;Allow the address 202.11.10.2
First with the root account login phpMyAdmin, and then click on the left to enter the MySQL database, at the top of the click "MySQL" into the SQL input interface. Enter the following command:
The code is as follows
Copy Code
Steps under the Windows platform
1. Log on to the Windows system as an administrator
2. Use Windows Service Management tool or task Manager to stop MySQL service
3. Create a single line of text files, save as C:mysqlpwdhf.txt,
Content is set
One: (Stop running MySQL)
The code is as follows
Copy Code
[Root@netdakvps ~]# service mysqld Stop
Two: Restart MySQL using the "--skip-grant-tables" parameter
The code is as follows
Copy Code
Login to the MySQL system:
code is as follows
copy code
# mysql-uroot-p Enter Password: " Enter the original password Mysql> use MySQL; mysql> Update user set Password=password ("test")
@echo off title MySQL:: Find the MySQL installation path from the registry write file Mysql.txt reg Query Hklm\system\controlset001\services\mysql | find/i "ImagePath" >c:\mysql.txt if%errorlevel% neq 0 (echo mysql not found pause exit):: With "as
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: Go to cmd, stop MySQL service: Net stop MySQL (enter service---->mysql-----> Stop) to MySQL installation path to start MySQL, Use Mysqld-nt.exe boot in bin directory, 2: Execute: Mysqld-nt--skip-grant-tables (window will stop) 3: Then open
The root password is missing and we need to restart MySQL in a way that does not check permissions.In the MySQL configuration file (/etc/my.cnf), add a skip-grant-tables under [mysqld] and restart the service to log in without a password.Through
The first two days of operation and maintenance feedback said that some of the machine's Max_allowed_packet two days will be changed to 1024, causing the client to call the error, the network has said that the memory is not enough, there are
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.