麒麟V10+鲲鹏920 环境二进制包安装mysql-8.0.33
1.上传并解压二进制包 mysql-8.0.33-linux-glibc2.28-aarch64.tar.gz
[root@hosts-vm29 tar]# pwd
/opt/tar
2.上传安装脚本 install-mysql.sh
[root@hosts-vm29 tar]# ll
总用量 911108
-rwxr-xr-x 1 root root 6299 8月 30 17:44 install-mysql.sh
-rw------- 1 root root 535300769 8月 30 17:53 mysql-8.0.33-linux-glibc2.28-aarch64.tar.gz
-rw------- 1 root root 633 8月 17 21:39 user.sql
[root@hosts-vm29 tar]#
[root@hosts-vm29 tar]#
[root@hosts-vm29 tar]# ./install-mysql.sh
USAGE: ./install-mysql.sh MySQL_TAR_FILE TARGET_PATH
e.g.: ./install-mysql.sh MySQL-8.0.25-linux-glibc2.28-aarch64.tar.xz /u01/mysql
3.执行安装脚本
[root@hosts-vm29 tar]# ./install-mysql.sh mysql-8.0.33-linux-glibc2.28-aarch64.tar.gz /u01/mysql
mysql-8.0.33-linux-glibc2.28-aarch64
**********************************Checking mysql process
**********************************
root 2638163 1 0 8月03 ? 02:00:28 ./mysqld_exporter --config.my-cnf=/opt/mysqld_exporter/my.cnf
**********************************Checking mysql listening port
**********************************
tcp6 0 0 :::9104 :::* LISTEN 2638163/./mysqld_ex
**********************************MySQL instance already started!
**********************************Stopping database
**********************************No instance to Stop!
**********************************Deleteing /u01/mysql/data
**********************************Createing /u01/mysql/data
**********************************Uncompress mysql-8.0.33-linux-glibc2.28-aarch64.tar.gz
File mysql-8.0.33-linux-glibc2.28-aarch64.tar.gz is a gz file.
File mysql-8.0.33-linux-glibc2.28-aarch64.tar.gz unzip......................OK.
/u01/mysql/
├── binlog
├── conf
├── data
├── log
├── pid
├── sh
├── socket
├── sql
├── svr
│ ├── mysql -> mysql-8.0.33-linux-glibc2.28-aarch64
│ └── mysql-8.0.33-linux-glibc2.28-aarch64
└── tmp
12 directories, 0 files
**********************************Create MySQL Config Start
**********************************Create MySQL Config Finished
**********************************Initialize database
**********************************Starting database
mysqld will log errors to /u01/mysql/log/error.log
mysqld is running as pid 1316739
**********************************
**********************************
**********************************Started database
**********************************Checking mysql process
**********************************
root 1316739 1 99 19:06 ? 00:00:12 ./mysqld --defaults-file=/u01/mysql/conf/my.cnf --daemonize --user=root
root 2638163 1 0 8月03 ? 02:00:28 ./mysqld_exporter --config.my-cnf=/opt/mysqld_exporter/my.cnf
**********************************Checking mysql listening port
**********************************
tcp6 0 0 :::9104 :::* LISTEN 2638163/./mysqld_ex
tcp6 0 0 :::33060 :::* LISTEN 1316739/./mysqld
tcp6 0 0 :::3306 :::* LISTEN 1316739/./mysqld
unix 2 [ ACC ] STREAM LISTENING 10105722 1316739/./mysqld /tmp/mysqlx.sock
unix 2 [ ACC ] STREAM LISTENING 10105726 1316739/./mysqld /u01/mysql/socket/mysql.sock
**********************************MySQL instance already started!
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
mysql: [Warning] Using a password on the command line interface can be insecure.
+------------------+-----------+
| user | host |
+------------------+-----------+
| root | % |
| tpcc | % |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| mysql_monitor | localhost |
| root | localhost |
+------------------+-----------+
mysql: [Warning] Using a password on the command line interface can be insecure.
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
[root@hosts-vm29 tar]#
4.查看配置文件:
【注:关于MySQL对应配置文件my.cnf 默认搜索顺序可以通过“mysql --help”查看,顺序为: /etc/my.cnf /etc/mysql/my.cnf /u01/mysql-5.7.40/etc/my.cnf ~/.my.cnf】
[root@hosts-vm29 tar]# cat /u01/mysql/conf/my.cnf
[mysqld]
basedir = /u01/mysql/svr/mysql
datadir = /u01/mysql/data
user = root
port = 3306
socket = /u01/mysql/socket/mysql.sock
#report_host = 192.168.114.26
#server_id = 100013306
tmpdir = /u01/mysql/tmp
general_log_file = /u01/mysql/log/general.log
log_bin = /u01/mysql/binlog/binlog
relay_log = /u01/mysql/log/relaylog
slow_query_log_file = /u01/mysql/log/slow_query_log.log
log_error = /u01/mysql/log/error.log
pid_file = /u01/mysql/pid/mysqld.pid
binlog_ignore_db = dbscale_tmp
default_authentication_plugin = mysql_native_password
enforce_gtid_consistency = ON
gtid_mode = ON
innodb_dedicated_server = ON
lower_case_table_names = 1
#innodb_buffer_pool_instances = 8
#innodb_buffer_pool_size = 16G
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT_NO_FSYNC
innodb_log_files_in_group=2
log_timestamps=SYSTEM
slow_query_log = OFF
sort_buffer_size = 2M
ssl = OFF
skip_log_bin
[mysql]
socket = /u01/mysql/socket/mysql.sock
[client]
port = 3306
user=root
password=
socket = /u01/mysql/socket/mysql.sock
default-character-set=utf8
[root@hosts-vm29 tar]#
|