Unified character encoding and creation user authorization

1./s; (all commands add a semicolon, different from Sqlserver, Oracle),

  Check the current configuration of Mysql

Share pictures

To unify character encoding , Please perform the following operations:

(1) my.ini file is the configuration file of mysql,

in C:\mysql-5.6.40 -Create a my.ini file under the winx64 file (installation path)

(2) Copy and save the following code.

copy code

[mysqld]
# Set the mysql installation directory ** The path behind must be the directory where SQL is installed (on your own computer)**
basedir=C:\mysql-5.7.22-winx64\mysql-5.7.22-winx64
# Set the storage directory of mysql database data, which must be data
datadir=C:\mysql-5.7.22 -winx64\mysql-5.7.22-winx64\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

# mysql port
port=3306
# Character set
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8

copy code

(3) Restart the service as an administrator and execute the following command

copy code

C:\Windows\system32>net stop MySQL

The MySQL service is stopping..
The MySQL service has been successfully stopped.

C:\Windows\system32>net start MySQL
The MySQL service is starting.
The MySQL service has been started successfully.
copy code< /span>

(4) Enter mysql in cmd to enter the mysql environment, execute \s, and display the following information, which means success

share picture

Under the C:\mysql-5.6.40-winx64 file ( Installation path) Create my.ini file

copy code

[mysqld]
# Set the mysql installation directory ** The path behind must be the directory where SQL is installed (own Computer) **
basedir=C:\mysql-5.7.22-winx64\mysql-5.7.22-winx64
# Set the storage directory of mysql database data, it must be data
datadir=C :\mysql-5.7.22-winx64\mysql-5.7.22-winx64\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

# mysql port
port=3306
# Character set< br>[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
[client]
default-character-set=utf8
[mysql]
default- character-set=utf8

copy code

copy code

copy code

copy code
C:\Windows\system32>net stop MySQL

The MySQL service is stopping..
The MySQL service has been successfully stopped.

C:\Windows\system32>net start MySQL
The MySQL service is starting.
The MySQL service has been started successfully.
copy code< /span>

copy code

copy code< /span>

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4971 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.