The following steps are a guide to installing the latest MySQL Community Server on CentOS 8.
A couple differences from prior guides is the later MySQL versions need to have lower case table names enabled before first start initialization and tls connections are enabled by default.
Centos 8 itself has its own mysql in the app repo.
That has to be disabled in order to use the latest MySQL.
____________________
Add mysql community repository:
Disable default mysql module:
yum module disable mysql
Install mysql community server:
yum install mysql-community-server
At this point do not start mysqld.
Edits need to be made so mysql initializes its system databases with lower case table names.
nano /etc/my.cnf
add the following under the [mysqld] section.
lower_case_tables_names=1
Start mysql:
systemctl start mysqld
Verify status:
systemctl status mysqld
Locate temporary password:
grep 'temporary password' /var/log/mysqld.log
Run the secure installation wizard.
mysql_secure_installation
(The main goal here is the resetting of the root mysql password)
IceWarp uses the native mysql password schema.
Edit my.cnf to set it as the default:
nano /etc/my.cnf
add the following under the [mysqld] section.
default_authentication_plugin=mysql_native_password
Restart mysql:
systemctl restart mysqld
The latest version of mysql enables ssl connections.
If IceWarp has problems connecting, the mysql feature can be disabled so it functions as previously.
nano /etc/my.cnf
add the following under the [mysqld] section.
tls_version=''
Restart mysql:
systemclt restart mysqld
Create databases, user, and assign privileges:
Login:
mysql -u root -p
Run the following commands:
create database icewarp_accounts DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_antispam DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_groupware DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_dircache DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_webcache DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_activesync DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_reports DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create user ‘user’@’%’ identified with mysql_native_password by ‘userspassword’;
create database icewarp_antispam DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_groupware DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_dircache DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_webcache DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_activesync DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create database icewarp_reports DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
create user ‘user’@’%’ identified with mysql_native_password by ‘userspassword’;
grant all on icewarp_accounts.* to 'user'@'%';
grant all on icewarp_antispam.* to 'user'@'%';
grant all on icewarp_groupware.* to 'user'@'%';
grant all on icewarp_dircache.* to 'user'@'%';
grant all on icewarp_webcache.* to 'user'@'%';
grant all on icewarp_activesync.* to 'user'@'%';
grant all on icewarp_reports.* to 'user'@'%';
Quit the mysql console.
Login using the IceWarp Console.
Go to File > API Console, search for mysqldefaultcharset and set to utf8mb4
Comments
0 comments
Article is closed for comments.