Mysql errors and Solutions

Source: Internet
Author: User

If a database error occurs, modify the corresponding code and restart mysql. If you encounter a mysql problem, restart mysql to see if the problem can be solved.

1005: An error occurred while creating the table.

1006: database creation failed

1007: the database already exists. An error occurred while creating the database.

1008: the database does not exist. An error occurred while deleting the database.

1009: the database file cannot be deleted, leading to database deletion failure.

1010: failed to delete database because the data directory cannot be deleted

1011: An error occurred while deleting the database file.

1012: records in the system table cannot be read.

1016: Unable to open the file

Start after clicking => All Programs => attachments => Command Prompt

Enter the hard drive letter of the mysql instance.

Directory of cd mysql

Cd bin

Enter myisamchk-f D: usr/local/mysql/data/bbs/PW_members.MYI

Ps: D: usr/local/mysql/data/bbs is the path of your forum Database

-F is selected based on the actual situation. Generally, you can select-r.

Pay attention to whether your system disk C or the hard disk space for storing the database is sufficient. Generally, errors may occur if the disk space is less than 1 GB.

Or use the mysqlcheck command to fix the issue. Specific Method: Use the command line to enter the mysql/bin directory and execute

Mysqlcheck-o-r phpwind-uroot-p

Phpwind indicates the name of your database, and root indicates your database username. Then, you are prompted to enter the password.

Then your database will be repaired.

1020: the record has been modified by another user

1021: The remaining space on the hard disk is insufficient. please increase the available space on the hard disk.

1022: duplicate keywords. failed to change the record

1023: An error occurred while disabling the service.

1024: An error occurred while reading the file.

1025: An error occurred while changing the name

1026: file write error

1032: the record does not exist

1036: The data table is read-only and cannot be modified.

1037: The system memory is insufficient. Restart the database or restart the server.

1038: the memory used for sorting is insufficient. Increase the sorting buffer.

1040: Maximum number of connections to the database. Increase the number of available connections to the database.

1041: insufficient system memory

1042: Invalid Host Name

1043: Invalid connection

1044: the current user is not authorized to access the database

1045: the database cannot be connected. The user name or password is incorrect.

Method: Make sure that the SQL _config.php user name and password under the Forum data directory are correct. If you forget the database password, you can modify the password as follows:

If MySQL is running, stop it first.

Start MySQL: bin/safe_mysqld -- skip-grant-tables &

You can access MySQL without a password.

Then

> Use mysql

> Update user set password = password ("new_pass") where user = "root ";

> Flush privileges;

Make sure that the data directory has the write permission when the database username and password are correct. For windows hosts, you can set the users user group to have the write permission in the data directory. You can use chmod-r 777 data to modify linux-like systems.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.