Home Database Mysql Tutorial mysql忘记密码怎么办(root密码忘记了)

mysql忘记密码怎么办(root密码忘记了)

Jun 07, 2016 pm 04:33 PM
mysql root password forget what to do

我就是个糊涂神,mysql的root密码居然被我忘记了。好惨烈啊,我怎么能够把密码忘掉呢,你是否也遇见同样的问题呢。忘记mysql密码的同学看过来咯。 停止mysql运行,在linux环境下 [shell]/etc/init.d/mysqld stop?[/shell] 修改mysql配置文件my.cnf,添加skip

我就是个糊涂神,mysql的root密码居然被我忘记了。好惨烈啊,我怎么能够把密码忘掉呢,你是否也遇见同样的问题呢。忘记mysql密码的同学看过来咯。

  1. 停止mysql运行,在linux环境下
  2. [shell]/etc/init.d/mysqld stop?[/shell]

  3. 修改mysql配置文件my.cnf,添加skip-grant-tables
  4. 重新启动mysql
  5. [shell]/etc/init.d/mysqld start?[/shell]

  6. 进入mysql数据库,更新root密码
  7. [shell]?mysql -uroot
    use mysql;
    update user set password=password(“letterforu”) where user=”root” [/shell]

  8. 重新启动mysql
  9. [shell]/etc/init.d/mysqld restart[/shell]

一定要吸取教训,刚把这些写完,结果没保存下来,没事就得更新下。不要做糊涂神,把密码记住吧。我曾经想做mysql管理员来着,现在都把mysql密码忘记了,看来数据库管理员这个职业离我还灰常灰常的远。

声明: 本文 ” mysql忘记密码怎么办(root密码忘记了)” 采用 BY-NC-SA 协议进行授权.

转载请注明本文链接地址: http://blog.ueder.info/367.html

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What should I do if I forget my Ouyi Wallet mnemonic phrase? Can it still be found? What should I do if I forget my Ouyi Wallet mnemonic phrase? Can it still be found? Jul 19, 2024 pm 12:13 PM

In the Web3 world, although it is free, it is full of dangers. Therefore, the first step in the security of Ouyi wallet is to protect the private key and mnemonic phrase. Everyone knows the importance of private keys, and today the emphasis is on mnemonics. The mnemonic phrase can be understood as another form of presentation of the private key. Having the mnemonic phrase is equivalent to owning the private key and controlling the wallet assets. It is also thought that its presence is lower than that of the private key, and users may forget the mnemonic phrase of Ouyi Wallet. So what should I do if I forget the mnemonic phrase of Ouyi Wallet? Can I still retrieve my Ouyi Wallet mnemonic if I forget it? Issues that users need to pay attention to. Generally speaking, if the mnemonic phrase is forgotten, it cannot be retrieved, but try to contact the relevant customer service personnel for help. The editor below will tell you in detail. What should I do if I forget my Ouyi Wallet mnemonic phrase? If you forget the mnemonic phrase of Ouyi Wallet, please try to recall it or contact us.

What to do if snowflakes appear on your TV (A practical way to solve the problem of snowflakes on your TV) What to do if snowflakes appear on your TV (A practical way to solve the problem of snowflakes on your TV) Jun 01, 2024 pm 09:44 PM

In our daily lives, TV, as an important entertainment device, often suffers from snowflakes, which affects our viewing experience. This article will introduce you to practical methods to solve the TV snow problem and help you enjoy TV programs better. 1. Analysis of the causes of snowflake problems Snowflakes appearing on TVs are generally caused by signal interference, antenna problems or TV signal sources. 2. Check whether the antenna connection is loose. First, check whether the connection between the TV and the antenna is firm. If it is loose, plug it in again. 3. Choose a suitable antenna to ensure that the position and direction of the antenna are correct. Choosing an antenna with good performance can improve the signal reception quality. 4. Adjust the direction of the antenna. Find the best signal reception direction by rotating or adjusting the angle of the antenna. 5. Use indoor antenna signals

How to use MySQL backup and restore in PHP? How to use MySQL backup and restore in PHP? Jun 03, 2024 pm 12:19 PM

Backing up and restoring a MySQL database in PHP can be achieved by following these steps: Back up the database: Use the mysqldump command to dump the database into a SQL file. Restore database: Use the mysql command to restore the database from SQL files.

How to optimize MySQL query performance in PHP? How to optimize MySQL query performance in PHP? Jun 03, 2024 pm 08:11 PM

MySQL query performance can be optimized by building indexes that reduce lookup time from linear complexity to logarithmic complexity. Use PreparedStatements to prevent SQL injection and improve query performance. Limit query results and reduce the amount of data processed by the server. Optimize join queries, including using appropriate join types, creating indexes, and considering using subqueries. Analyze queries to identify bottlenecks; use caching to reduce database load; optimize PHP code to minimize overhead.

What should I do if my Win10 password does not meet the password policy requirements? What to do if my computer password does not meet the policy requirements? What should I do if my Win10 password does not meet the password policy requirements? What to do if my computer password does not meet the policy requirements? Jun 25, 2024 pm 04:59 PM

In the Windows 10 system, the password policy is a set of security rules to ensure that the passwords set by users meet certain strength and complexity requirements. If the system prompts that your password does not meet the password policy requirements, it usually means that your password does not meet the requirements set by Microsoft. standards for complexity, length, or character types, so how can this be avoided? Users can directly find the password policy under the local computer policy to perform operations. Let’s take a look below. Solutions that do not comply with password policy specifications: Change the password length: According to the password policy requirements, we can try to increase the length of the password, such as changing the original 6-digit password to 8-digit or longer. Add special characters: Password policies often require special characters such as @, #, $, etc. I

How to solve the rustling sound during TV playback (eliminate TV rustling sound) How to solve the rustling sound during TV playback (eliminate TV rustling sound) Jul 21, 2024 pm 03:29 PM

With the advancement of technology and people's increasing demand for high-definition picture quality, TV has become an indispensable part of home entertainment. However, sometimes you may hear an annoying rustling sound while watching TV, which not only affects the viewing experience, but may also cause the TV to malfunction. This article will introduce some methods to solve the rustling sound during TV playback, so that you can enjoy a higher quality movie viewing experience. 1: Check whether the audio cable connection is loose. If there is a rustling sound when the TV is playing, first check whether the audio cable connection is firm. Make sure both ends of the audio cable are plugged into the correct connectors and check for loose connections or poor connections. Two: Adjust the TV volume and audio device settings. Appropriately adjusting the TV volume and audio device settings will help eliminate rustling sounds. try

How to insert data into a MySQL table using PHP? How to insert data into a MySQL table using PHP? Jun 02, 2024 pm 02:26 PM

How to insert data into MySQL table? Connect to the database: Use mysqli to establish a connection to the database. Prepare the SQL query: Write an INSERT statement to specify the columns and values ​​to be inserted. Execute query: Use the query() method to execute the insertion query. If successful, a confirmation message will be output.

How to use MySQL stored procedures in PHP? How to use MySQL stored procedures in PHP? Jun 02, 2024 pm 02:13 PM

To use MySQL stored procedures in PHP: Use PDO or the MySQLi extension to connect to a MySQL database. Prepare the statement to call the stored procedure. Execute the stored procedure. Process the result set (if the stored procedure returns results). Close the database connection.

See all articles