MySQL cannot be started, and the MySQL service cannot be started

Updated on technology 2024-02-09
4 answers
  1. Anonymous users2024-02-05

    Troubleshooting. Remove the redo log file you are currently using, and then you can try to start the database, but it fails!

    space=0, page number=0] log sequence number 178377412422 is in the future! current system log sequence number 165909011496.

    This error is due to the fact that the MySQL Writer thread flushes the buffer data to disk in pages at configured intervals. When the data is flushed to disk, the page newly written to the disk contains the newer lsn, and the lsn of the system tablespace header is not updated synchronously, which is usually the work of the checkpoint thread. In normal crash recovery, MySQL can use Redo Log to roll forward and roll back, but at this time, Redo Log has been deleted by us, and MySQL cannot recover it.

    At this time, we set innodb force recovery=3 to force MySQL to start, but it still doesn't start, and it starts after changing it to 4!

    Then I used mysqldump to export the backup, and the nightmare came again! MySQL is crashing again.

    Set the parameter innodb force recovery=5, the database still fails to start, and then set it to 6, the start is successful! The data was backed up smoothly with sqldump!

    Initialize the database again, import the database you just backed up, and the database recovery is successfully completed!

    Parameter description. The key here is to set the innodb force recovery parameter, which is described below

    1.srv force ignore corrupt: ignores the corrupt pages that are checked;

    2.srv force no background: prevents the main thread from running, if the main thread needs to perform a full purge operation, it will cause a crash;

    3.srv force no trx undo: does not perform transaction rollback operations;

    4.srv force no ibuf merge: does not merge by inserting buffers;

    5.srv force no undo log scan: If you don't view the redo log, the innodb storage engine will treat uncommitted transactions as committed;

    6.srv force no log redo: does not roll forward.

  2. Anonymous users2024-02-04

    Landlord,When your MySQL installation is completed,,It will automatically generate a database called MySQL,This database stores the meta information of the MySQL database,Including information about passwords、Permissions and so on。

    From your mysql logs, it can be seen that the mysql database is corrupted, the only way is to reinstall, please note: be sure to uninstall it before reinstalling, otherwise the installation will go wrong, good luck.

  3. Anonymous users2024-02-03

    The host table in the MySQL database cannot be opened? It looks damaged. Is it advisable to reinstall one of lz?

  4. Anonymous users2024-02-02

    There are a number of reasons why a MySQL service might not start: it may be that the port is occupied; The wrong parameters may have been configured; It's also possible that there isn't an initial database, or there could be other reasons. Most of the causes can be solved by logging out of the old service, reloading the service, and then restarting it.

    You can also try the following:

    Device: Huawei laptop.

    System: win7.

    Software: File Sakura with Zen Touch settings.

    Version:. 1. Change the name of the configuration file in the directory to the bin directory. Spine ambush.

    2. Start the command line and switch the directory to the bin directory of the mysql installation directory.

    3. Next, run the command on the command line: mysqld --initialize --user=mysql --console.

    4. Note that the previous step will get a temporary password, which needs to be recorded, and will be used later.

    5. Next, enter mysqld --install in the command line in the console to install the service.

    6. After that, find "Services" in the task manager and start the MySQL service in it.

    7. After that, enter the command line mysql -uroot -p, and use the previous temporary password input to log in to the database successfully.

    8. Change the temporary password, set the password: mysqladmin -u user -p password password, pay attention to the values defined by user and password.

Related questions
4 answers2024-02-09

Oracle's parser processes the table names in the From clause in right-to-left order, the table written at the end of the From clause (the driving table) will be processed first, and if the FROM clause contains multiple tables, you must select the table with the fewest records as the base table. If you have more than 3 table join queries, you need to select an intersection table as the underlying table, which is the table that is referenced by other tables. >>>More

2 answers2024-02-09

1. MySQL database has several configuration options that can help us capture inefficient SQL statements in a timely manner1, Slow Query Log >>>More

5 answers2024-02-09

It seems that there is something called triggers in the DB, and there seems to be another thing called transactions.

4 answers2024-02-09

After turning it on, there is no downtime, error or anything, and it will continue to be carried out.

20 answers2024-02-09

According to what you say.

Try a different ghost disc first, or reinstall a system directly without using ghost. >>>More