Solutions to errors during mysql addition, deletion, modification, and query
Information 1: Error: Access denied for user: 'linanma @ localhost' (Using password: YES)
Error Analysis: This is one of the common problems for new users to install forums. There are generally two causes.
1. Errors Caused by incorrect database username or password.
2. The property of config. inc. php is not 777.
Solution:
1. Contact the space service provider for the correct username and password of the database server. Remember the password of the database server.
If this problem occurs during installation, enter the correct user name and password in the input box.
2. Modify the attribute config. inc. php In the root directory of the Forum to 777. Log on to the ftp site using ftp software,
Right-click config. inc. php and choose ">" attributes "to set to readable and writable (777 ).
Information 2: Error: Unknown column 'msignature 'in 'field list'
Error analysis: The 'msignature 'field is missing, generally because the plug-in is installed.
Because the program file is modified but the database is not upgraded, or because the database and program file are not
Match, that is, the version of the database is different from the version of the program file (discuz is used here ).
Version. For example, if the database uses discuz2.x and the program file is discuz4.0, it will certainly
).
Solution: If a plug-in is installed, check the plug-in installation instructions.
There are SQL statements for upgrading the database. After finding them, enter "system settings"-> "number as the administrator.
"Database Upgrade"-> copy the SQL statement you found to upgrade the database to the above-> "Submit ". If you still
If the problem persists, delete the file you modified on the server, and then upload the file
Directory (that is, replace files on the server with files that have not been modified on your machine ). If
The problem has not been solved. Please first determine which version of your database is discuz, and then upload this
The version of the program file to the server.
Information 3: Error: Can't open file: 'cdb _ forums. myi'. (errn 145)
Error analysis: the server is shut down illegally, which may affect some databases. An error is reported during normal operation.
**. MYI cannot be enabled.
Can't find file: '***. myi'
Solution: Use the repair. php file in the utilities directory in the compressed Forum package you downloaded to fix it.
Method: Upload repair. php to the root directory of the Forum,
Then run http: // your forum address/repair. php In the browser
Generally, click the first link "repair. php? Html = 1 & check = 1 "to fix it,
If it cannot be repaired, click the second connection "repair. php? Check = 1 & iterations = 5"
You can.
Tip: After you fix the table, remember to delete the repair. php file from the server.
Information 4: SQL: Select groupid, url, title FROM cdb_onlinelist Where 1 orDER BY displayorder Error: Got error 127 from storage engine Errno.: 1030
Error analysis: the query table is damaged.
Solution: Same as above 3
This problem can also be solved by restoring the previous backup data.
Information 5: SQL: Create TABLE cdb_access (uid mediumint (8) unsigned NOT NULL default '0', fid smallint (6) unsigned NOT NULL default '0', allowview tinyint (1) not null default '0', allowpost tinyint (1) not null default '0', allowreply tinyint (1) not null default '0', allowgetattach tinyint (1) not null default '0', primary key (uid, fid) ENGINE = MyISAM default charset = latin1 Error: You have an error in your SQL syntax. check the manual that corresponds to your MySQL server version for the right syntax to use near 'default CHARSET = latin1 'at line 1 Errno. 1064
Error analysis: the default charset = latin1 error at the end of the statement is caused by MySQL
If there is a version difference, you can use Versions later than 4.1. Versions earlier than 4.1 will prompt the above errors.
Solution: manually remove default charset = latin1 before importing data. Use text encoding
Open the backup file and find default charset = latin1 and replace it with null,
That is, delete this sentence.
Information 6: Error: Can't connect to local MySQL server through socket '/var/lib/mysql. sock' (2)
Error Analysis: There are two possible causes of this error.
1. the MySQL server is not enabled.
2. MySQL is not compiled during php compilation.
Solution: Obviously, both cases are caused by the server. Therefore, contact the space service provider as soon as possible,
Let them solve the problem. If it is locally installed on your own machine, check whether it is enabled.
MySQL server. If not, enable it first.
Information 7: Error: Table 'test. cdb_sessions 'doesn' t exist
Error Analysis: this problem occurs because the queried table does not exist.
Solution: you can restore the backup data to solve this problem. Log on to your
Forum> system Settings> data recovery if the backed up data is on your own machine, Click Browse
Select your backup file and click Submit ". If the backup data is on the server
Click "import" for the backup you want to restore ".
Tip: all similar (Table 'table _ name' doesn' t exist) can use this
To solve the problem. We recommend that you do not store the backup on the server as much as possible to avoid malicious download or export.
Delete the backup immediately after the import.
Information 8: Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1 Errno.: 1064
Error Analysis: this error is caused by an SQL statement error. This error is generally caused by a change in the plug-in installation or other operations.
Caused by a program file.
Solution: Replace the error file to solve the problem. Re-upload an error file with the same name to the server,
For example, if you modify the viewthread. php file when installing the plug-in and the result is incorrect, you can
Upload viewthread. php files that have not been modified on your machine. The system will prompt you that there is already
You only need to replace the viewthread. php file (some systems are called "Overwrite.
Tip: When you need to modify the original program when installing the plug-in, it is best to back up the program file first for emergency purposes.
Information 9: SQL: Create DATABASE db1 Error: Access denied for user: 'f54 _ daneoli@203.104.103.186 'to database 'db1'
Error Analysis: this error is caused by the permissions of the database user. That is to say, you have not created a database.
Permission (Create DATABASE 'db _ name'), which is restricted by many spaces.
Solution: Ask the Space Provider about the database name you can use. To install discuz, enter the name in the database field.
The above name is enough.
Tip: Generally, a management platform is provided for all your information. Of course
Including the Database Name
Information 10: Error: Got error 28 from table handler Errno.: 1030
Error Analysis: this error occurs because the disk space of the database is full.
Solution: You can delete some database log files. If not, contact the Space Provider.
Increase database space.
Information 11: Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client Errno.: 1251
Error Analysis: [cite the official website] If you encounter the above problems after upgrading mysql to mysql 4.1 or later, please confirm first
Your mysql client version is 4.1 or later. (if there is a problem in WINDOWS, you can directly jump to the following to see
Solution, because MYSQL is installed with the client and server in WINDOWS)
Solution:
1. windows Platform
This mainly changes the encryption method of the account connecting to MySQL.
You can solve this problem in two ways:
Mysql-> set password for 'some _ user' @ 'some _ host' = OLD_PASSWORD ('new _ password ');
Mysql-> Update mysql. user SET Password = OLD_PASSWORD ('new _ password') Where Host = 'some _ host' AND User = 'some _ user ';
2. Unix platform
On the linux platform, first determine whether the MySQL client has been installed. The rpm installation is simple:
Rpm-ivh MySQL-client-4.1.15-0.i386.rpm
Add the following when compiling php:
-- With-mysql =/your/path/to/mysql
Generally, it can be solved. If this error persists, follow these steps:
Mysql-> set password for 'some _ user' @ 'some _ host' = OLD_PASSWORD ('new _ password ');
Mysql-> Update mysql. user SET Password = OLD_PASSWORD ('new _ password') Where Host = 'some _ host' AND User = 'some _ user ';
Information 12: Error: Can't connect to local MySQL server through socket '/tmp/mysql. sock' (2)
Error Analysis: this error may occur in two cases: 1. the MySQL server is not enabled. 2. php Compilation
MySQL is not compiled.
Solution: Obviously, both cases are caused by the server. Therefore, contact the space service provider as soon as possible,
Let them solve the problem.
Information 13: SQL: Select COUNT (*) FROM cdb_banned Where (ip1 = '000000' or ip1 = '-1 ') AND (ip2 = '77' or ip2 = '-1') AND (ip3 = '20140901' or ip3 ='-1 ') AND (ip4 = '000000' or ip4 = '-1') Error: No Database Selected Errno. 1046
Error Analysis: literally, no database is selected.
Two cases:
1. The database is deleted.
2. the config. inc. php configuration file is incorrect.
Solution: In response to the above situation 1. First reinstall the Forum, log on to the "system settings"-> "-〉
"Data recovery" click "Browse" to select your previous backup file and click "Submit ".
2. Use a text editor to open the config. inc. php file in the root directory of the Forum.
. Enter the following information.
$ Dbhost = 'localhost'; // database server
// Database Server
$ Dbuser = 'dbuser'; // database username
$ Dbpw = 'dbpasswd'; // database password
$ Dbname = 'dbname'; // database name
Tip: do not replace config. inc. php when replacing the file when an error occurs in the program file,
Otherwise, the above error occurs.
Information 14: Error: Unknown column 'column _ name' in 'field list' the program file conflicts with the database. Use the correct program file to upload and overwrite it.
Error analysis: The column_name field is missing. May be 1. Because a plug-in is installed
The database is not upgraded accordingly, or 2. The database does not match the program file, that is, the version
Different causes.
Solution: 1. Upgrade the database in the background settings. After logging on, go to "system settings"
-> "Data recovery" click "Browse" to select your previous backup file and click "Submit ". Or
Select a backup file and click "import" next to the backup file you need ".
2. Upload the program files matching the database to the server to replace the original files except config. inc. php.
Information 15: SQL: Array Error: You have an error in your SQL syntax. check the manual that corresponds to your MySQL server version for the right syntax to use near 'array' at line 1 Errno. 1064
Error Analysis: this error is caused by an SQL statement error. It is generally caused by the installation of plug-ins or other operations.
When the program file is changed.
Solution: Replace the wrong file to solve the problem, that is, re-upload the program file.
Tip: When you need to modify the original program when installing the plug-in, it is best to back up the program file first for emergency purposes.
Information 16: SQL: Insert INTO cdb_pms VALUES (, 'yang Xiao Xie ', '1', '7', 'inbox', '1 ', 'You have a new group photo request ', '000000', 'yang xiaoxie initiated a group photo request to you. Go to the photo studio to view your photo taking request and perform relevant operations. ') Error: Column count doesn' t match value count at row 1 Errno.: 1136
Error analysis: the fields in the data table and values are not matched. There are two main causes:
1. This error is caused by mismatch between program files and database files when a short message is sent.
2. When data is restored, the backup data and the data structure used are different.
Solution:
1. Use the correct program file that matches the database (that is, the discuz version of the database and the sequence file)
(Version scuz is the same) replace the original program file except config. inc. php.
2. Restore the database structure in use to the same structure as the backup data, and restore the data before
Upgrade the database.
Information 17: SQL: Insert INTO cdb_settings VALUES ('delayreply', 0) Error: Duplicate entry 'delayreply' for key 1 Errno.: 1062
Error Analysis: when inserting a record into a data table, a record with the same primary key as this record already exists in this
Table. This error occurs because the primary key is unique.
Solution: Since this record already exists, you don't need to insert it. At this time, there is no victory. If
If you want to insert it, delete the original record first. Go to phpmyadmin and select Delete
The table where the record is located, Click Browse, find the record you want to delete, and click the Red Cross (some are
"Delete ")
Information 18: SQL: REPLACE INTO cdb_statvars (type, variable, value) VALUES ('main', 'bestamp', '<a href = "viewpro. php? Username = % 27.% A6 % B1ucca. % 21 "> '. ucca .! </A> ') Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near'. your ucca .! ')' At line 2 Errno.: 1064
Error Analysis: Most errors of this type occur after you modify the program file when installing the plug-in.
The above problem is an SQL statement error, with an additional'
Solution: Use a text editor (such as NotePad) to open an error file and find the code,
Remove the 'After "bold"> in the SQL statement.
Information 19: SQL: Create TABLE cdb_sessions (sid char (6) character set latin1 collate latin1_bin NOT NULL default, ip1 tinyint (3) unsigned NOT NULL default '0 ', ip2 tinyint (3) unsigned not null default '0', ip3 tinyint (3) unsigned not null default '0', ip4 tinyint (3) unsigned not null default '0 ', uid mediumint (8) unsigned not null default '0', username char (15) not null default, groupid smallint (6) unsigned not null default '0', styleid smallint (6) unsigned not null default '0', invisible tinyint (1) not null default '0', 'Action' tinyint (1) unsigned not null default '0', lastactivity int (10) unsigned not null default '0', fid smallint (6) unsigned not null default '0', tid mediumint (8) unsigned not null default '0', KEY sid (sid )) TYPE = HEAP MAX_ROWS = 50000 Error: You have an error in your SQL syntax. check the manual that corresponds to your MySQL server version for the right syntax to use near 'collate latin1_bin not null default, ip1 tinyint (3) unsigne Errno. 1064
Error Analysis: this problem is also caused by different MySQL versions.
Solution: manually modify the file to be imported before import. Remove
Character set latin1 collate latin1_bin. Use a text editor.
(For example, notepad, etc.) on behalf of the wrong backup file, find
Character set latin1 collate latin1_bin, locate it, and delete it one by one,
Or open and replace. In the search box, enter character set latin1 collate latin1_bin.
Do not enter anything in the replacement column. leave it blank and click "replace all ".
Information 20: SQL: SHOW Create TABLE cdb_rsscaches Error: Can't find file: 'cdb _ rsscaches. myd' (errn 2) Errno.: 1017
Error analysis: the server is shut down illegally, which may affect some databases.
An error is reported during normal operation.
**. MYD cannot be enabled.
Can't find file: '***. myi'
Solution: Use the repair. php file in the utilities directory in the compressed Forum package you downloaded to fix it.
Method: Upload repair. php to the root directory of the forum and run it in the browser.
Http: // your forum address/repair. php
Generally, click the first link "repair. php? Html = 1 & check = 1 "to fix it,
If it cannot be repaired, click the second connection "repair. php? Check = 1 & iterations = 5"
You can.
Tip: After you fix the table, remember to delete the repair. php file from the server.
Information 21: SQL: Create TABLE 'cdb _ Access' ('uid' mediumint (8) unsigned NOT NULL default '0', 'fid' smallint (6) unsigned not null default '0', 'allowview' tinyint (1) not null default '0', 'allowpost' tinyint (1) not null default '0 ', 'allowreply' tinyint (1) not null default '0', 'allowgetattach 'tinyint (1) not null default '0', 'allowstattach' tinyint (1) not null default '0', primary key ('uid', 'fid') ENGINE = MyISAM Error: you have an error in your SQL syntax near 'Engine = myisam' at line 1 Errno. 1064
Error Analysis: SQL statement errors caused by MySQL.
Solution: Use a text editor (such as NotePad) to open an error file, search for ENGINE = MyISAM, and delete it.