Question one:
the first time MySQL startup service failed, no error message returnedWorkaround: ExecuteMysqld-consolecommand, check the error message, but generally, mainly because the contents of the Data folder in the MySQL directory is incorrect, the solution has the following two 1. Execute initialization commands before opening the servicemysqld--initalizeThen start the service 2. Download 5.6 or a previous version of the MySQL compression package to extract the compressed package after the data folder copied to the current MySQL folder root directory and then start the service whether it is the first operation or the second operation, remember to switch off the service in operation, and then open the service problem two:
MySQL lacks performance_schema.session system tables causing various problemsWorkaround: Restart the service after using the following two commands (Windows is turned off and then on)mysql_upgrade-u root-pmysql_upgrade-u root-p--forceQuestion three:
when inserting data in MySQL, use Chinese error, error code:1366. Incorrect string value. Workaround: Need to complete the following steps, if the first cannot be completed can skip, only affect the contents of the database, but in order to ensure that the new database, data table can be written in Chinese, the 23rd step must be correct. 1. Set the MySQL encoding to UTF8 (because UTF8 is a strong compatibility code, if you need to use another language can also be modified to other encodings) to open the root directory of MySQL, Create a new file My.ini then copy the contents of the My-default.ini to My.ini and then delete the My-default.ini file, and add a statement under the My.ini section of the file mysqld UTF8, then shut down the MySQL service and then start the MySQL service. After logging into MySQL, do not select any database, directly use the \s command to view the character set encoding, see if the encoding of the server is UTF8, if so, even if the remaining client and Conn should default to GBK, If not, you can search the Internet for a search of the setting method as for the DB encoding, in fact, and the database, when the first connection to MySQL, in fact, chose the SYS database (the default system database), and so on the following second step after the selection of other databases and then use the \s command, you will find the difference. 2. When you create a new database, set the database to UTF8 encoding This step, you will find that the database you just created the DB character set encoding must be UTF8, but also ensure that your new database can be entered in Chinese. Specific as followsCREATE database name CHARACTER SET ' UTF8 ';3. If the encoding of the database is not set, and you still want to input Chinese, then you need to create a new data table when the table encoding to set the following code snippet, build multiple fields, use character SET ' UTF8 ' code to change all the fields in the table to UTF8 formatCREATE Table Table name(a whole bunch of fields) CHARACTER SET ' UTF8 '; The above steps are done as much as possible when the MySQL installation is configured, avoiding unnecessary hassles, or at least completing the second third step.
MySQL problems encountered in the use of