当前位置:Gxlcms > 数据库问题 > wdcp系统升级mysql5.7.11

wdcp系统升级mysql5.7.11

时间:2021-07-01 10:21:17 帮助过:2人阅读


#-----------------------------------
#added by musictom
early-plugin-load=""
datadir=/www/wdlinux/mysql-5.7.11/var
basedir=/www/wdlinux/mysql-5.7.11
user=root

character-set-server=utf8mb4

collation_server=utf8mb4_unicode_ci

character-set-client-handshake = FALSE

init_connect=‘SET NAMES utf8mb4‘

#
#-----------------------------------
注释thread_concurrency
#thread_concurrency = 8

------------------------------------

[mysql]

#-------------------------------

#added by musictom

default-character-set = utf8mb4

#-------------------------------


初始化数据库
mysqld --basedir=/www/wdlinux/mysql-5.7.11 --user=mysql --datadir=/www/wdlinux/mysql-5.7.11/var --initialize
生成的root初始密码为"IWse#l?eh6#1"

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-04-13T02:46:02.891041Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-04-13T02:46:03.137034Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-04-13T02:46:03.201517Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: dcd726b9-0121-11e6-9763-525400b32df6.
2016-04-13T02:46:03.202687Z 0 [Warning] Gtid table is not ready to be used. Table ‘mysql.gtid_executed‘ cannot be opened.
2016-04-13T02:46:03.203686Z 1 [Note] A temporary password is generated for root@localhost: IWse#l?eh6#1

--------------------------------------
启动数据库
cd /www/wdlinux/init.d
./mysqld start
Starting MySQL. SUCCESS!


---------------------------------------
修改root密码
mysqladmin -u root -p"IWse#l?eh6#1" password "Bgichina1&test"

mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
---------------------------------------
还原数据库
mysql -uroot -p"Bgichina1&test"
create database db_wegram;
create database wdcpdb;


mysql -uroot -p"Bgichina1&test" db_wegram < db_wegram_test.dump
mysql -uroot -p"Bgichina1&test" wdcpdb < wdcpdb_test.dump


-----------------------------------------
修改表的charset
alter table chat_message CHARSET=utf8mb4;
alter table chat_message CHANGE content content VARCHAR(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

-----------------------------------------
解决“无法连接mysql,请检查mysql是否已启动及用户密码是否设置正确!:”的问题
在phpmyadmin里添加用户wdcp@localhost
点击localhost>>wdcpdb>>点右侧的人行图标,提示“检查数据库wdcpdb的权限”
点下方的“添加新用户”按钮
密码输入abcd1234
用户数据库的选项选择“授予数据库“wdcpdb”的所有权限。”,然后保存
密码还可以修改的

技术分享

技术分享

技术分享

然后cd /www/wdlinux/wdcp/data
vim db.inc.php
$dbuser=‘wdcp‘;
$dbpw=‘abcd1234‘;
保存就可以了,注意如果注释行的话用//而不是#,不然有可能会让wdcp面板出现白板

wdcp系统升级mysql5.7.11

标签:

人气教程排行