1.在服务器上安装好mysql之后启动报错
[root@10-7-14-25 ~]# systemctl status mysqld.service
● mysqld.service - MySQL Community Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: activating (start-post) since Wed 2022-03-30 15:19:17 CST; 8min ago
Process: 14969 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 14904 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 14969 (code=exited, status=0/SUCCESS); : 14970 (mysql-systemd-s)
Tasks: 2
CGroup: /system.slice/mysqld.service
└─control
├─14970 /bin/bash /usr/bin/mysql-systemd-start post
└─17181 sleep 1
Mar 30 15:19:22 10-7-14-25 mysql-systemd-start[14904]: Note: new default config file not created.
Mar 30 15:19:22 10-7-14-25 mysql-systemd-start[14904]: Please make sure your config file is current
Mar 30 15:19:22 10-7-14-25 mysql-systemd-start[14904]: WARNING: Default config file /etc/my.cnf exists on the system
Mar 30 15:19:22 10-7-14-25 mysql-systemd-start[14904]: This file will be read by default by the MySQL server
Mar 30 15:19:22 10-7-14-25 mysql-systemd-start[14904]: If you do not want to use this, either remove it, or use the
Mar 30 15:19:22 10-7-14-25 mysql-systemd-start[14904]: --defaults-file argument to mysqld_safe when starting the server
Mar 30 15:19:22 10-7-14-25 mysqld_safe[14969]: 220330 15:19:22 mysqld_safe Logging to '/var/log/mysqld.log'.
Mar 30 15:19:22 10-7-14-25 mysqld_safe[14969]: 220330 15:19:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Mar 30 15:19:23 10-7-14-25 mysqld_safe[14969]: /usr/bin/mysqld_safe: line 183: 15137 Killed nohup /usr/sbin/mysqld --basedir=/usr --datadir=/v...
Mar 30 15:19:23 10-7-14-25 mysqld_safe[14969]: 220330 15:19:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Hint: Some lines were ellipsized, use -l to show in full.
2.然后我过了一会儿我去查了一下mysql的log文件,发现好像启动了
[root@10-7-14-25 ~]# cat /var/log/mysqld.log
220330 15:19:22 mysqld_safe Logging to '/var/log/mysqld.log'.
220330 15:19:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2022-03-30 15:19:23 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-03-30 15:19:23 0 [Note] /usr/sbin/mysqld (mysqld 5.6.51) starting as process 15137 ...
2022-03-30 15:19:23 15137 [Note] Plugin 'FEDERATED' is disabled.
2022-03-30 15:19:23 15137 [Note] InnoDB: Using atomics to ref count buffer pool pages
2022-03-30 15:19:23 15137 [Note] InnoDB: The InnoDB memory heap is disabled
2022-03-30 15:19:23 15137 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-03-30 15:19:23 15137 [Note] InnoDB: Memory barrier is not used
2022-03-30 15:19:23 15137 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-03-30 15:19:23 15137 [Note] InnoDB: Using Linux native AIO
2022-03-30 15:19:23 15137 [Note] InnoDB: Using CPU crc32 instructions
2022-03-30 15:19:23 15137 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2022-03-30 15:19:23 15137 [Note] InnoDB: Completed initialization of buffer pool
2022-03-30 15:19:23 15137 [Note] InnoDB: Highest supported file format is Barracuda.
2022-03-30 15:19:23 15137 [Note] InnoDB: 128 rollback segment(s) are active.
2022-03-30 15:19:23 15137 [Note] InnoDB: Waiting for purge to start
220330 15:19:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
220330 15:29:22 mysqld_safe Logging to '/var/log/mysqld.log'.
220330 15:29:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2022-03-30 15:29:23 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-03-30 15:29:23 0 [Note] /usr/sbin/mysqld (mysqld 5.6.51) starting as process 17889 ...
2022-03-30 15:29:23 17889 [Note] Plugin 'FEDERATED' is disabled.
2022-03-30 15:29:23 17889 [Note] InnoDB: Using atomics to ref count buffer pool pages
2022-03-30 15:29:23 17889 [Note] InnoDB: The InnoDB memory heap is disabled
2022-03-30 15:29:23 17889 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-03-30 15:29:23 17889 [Note] InnoDB: Memory barrier is not used
2022-03-30 15:29:23 17889 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-03-30 15:29:23 17889 [Note] InnoDB: Using Linux native AIO
2022-03-30 15:29:23 17889 [Note] InnoDB: Using CPU crc32 instructions
2022-03-30 15:29:23 17889 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2022-03-30 15:29:23 17889 [Note] InnoDB: Completed initialization of buffer pool
2022-03-30 15:29:23 17889 [Note] InnoDB: Highest supported file format is Barracuda.
2022-03-30 15:29:23 17889 [Note] InnoDB: 128 rollback segment(s) are active.
2022-03-30 15:29:23 17889 [Note] InnoDB: Waiting for purge to start
2022-03-30 15:29:23 17889 [Note] InnoDB: 5.6.51 started; log sequence number 1625987
2022-03-30 15:29:23 17889 [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: 1f233607-affb-11ec-ae65-525400ee5e4f.
2022-03-30 15:29:23 17889 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2022-03-30 15:29:23 17889 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2022-03-30 15:29:23 17889 [Note] Server hostname (bind-address): '*'; port: 3306
2022-03-30 15:29:23 17889 [Note] IPv6 is available.
2022-03-30 15:29:23 17889 [Note] - '::' resolves to '::';
2022-03-30 15:29:23 17889 [Note] Server socket created on IP: '::'.
2022-03-30 15:29:23 17889 [Note] Event Scheduler: Loaded 0 events
2022-03-30 15:29:23 17889 [Note] /usr/sbin/mysqld: ready for connections.
3.通过netstat查看一下服务器端口,启动了
[root@10-7-14-25 ~]# netstat -anp|grep 3306
tcp6 0 0 :::3306 :::* LISTEN 17889/mysqld
==或许是初始化的时间太长了????我不理解
|