MySQL 5.7.28  Community Server   Centos7

### MySQL 5.7.28  Community Server   Centos7

[lake@localhost opt]$ netstat  -an --tcp |grep 3306
tcp6       0      0 :::3306                 :::*                    LISTEN

[lake@localhost opt]$ systemctl status  mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2020-06-11 09:42:28 CST; 1h 32min ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
 Main PID: 9030 (mysqld)
   CGroup: /system.slice/mysqld.service
           └─9030 /usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf

Jun 11 09:42:29 localhost.localdomain mysqld[9030]: 2020-06-11T01:42:29.194736Z 0 [Note] /usr/l...s.
Jun 11 09:42:29 localhost.localdomain mysqld[9030]: Version: '5.7.28'  socket: '/tmp/mysql.sock...L)
Jun 11 09:42:48 localhost.localdomain mysqld[9030]: 2020-06-11T01:42:48.523547Z 2 [Note] Access...S)
Jun 11 09:43:42 localhost.localdomain mysqld[9030]: 2020-06-11T01:43:42.104118Z 3 [Note] Access...S)
Jun 11 09:57:06 localhost.localdomain mysqld[9030]: 2020-06-11T01:57:06.800131Z 7 [Warning] IP ...wn
Jun 11 09:57:09 localhost.localdomain mysqld[9030]: 2020-06-11T01:57:09.490904Z 7 [Note] Aborte...s)
Jun 11 10:08:03 localhost.localdomain mysqld[9030]: 2020-06-11T02:08:03.207293Z 8 [Note] Got pa...er
Jun 11 11:13:30 localhost.localdomain mysqld[9030]: 2020-06-11T03:13:30.651913Z 9 [Note] Access...O)
Jun 11 11:13:36 localhost.localdomain mysqld[9030]: 2020-06-11T03:13:36.239369Z 10 [Note] Acces...O)
Jun 11 11:13:42 localhost.localdomain mysqld[9030]: 2020-06-11T03:13:42.416869Z 11 [Note] Acces...O)
Hint: Some lines were ellipsized, use -l to show in full.
[lake@localhost opt]$ cat /etc/my.cnf
#[mysqld]
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
## Disabling symbolic-links is recommended to prevent assorted security risks
#symbolic-links=0
## Settings user and group are ignored when systemd is used.
## If you need to run mysqld under a different user or group,
## customize your systemd unit file for mariadb according to the
## instructions in http://fedoraproject.org/wiki/Systemd
#
#[mysqld_safe]
#log-error=/var/log/mariadb/mariadb.log
#pid-file=/var/run/mariadb/mariadb.pid
#
##
## include all files from the config directory
##
#!includedir /etc/my.cnf.d

[mysqld]
user=mysql
basedir=/usr/local/mysql
datadir=/data_mysql
server_id=6
port=3306
socket=/tmp/mysql.sock
[mysql]
socket=/tmp/mysql.sock
[lake@localhost opt]$ mysql
ERROR 1045 (28000): Access denied for user 'lake'@'localhost' (using password: NO)
[lake@localhost opt]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.7.28 MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>  

mysql> select user,authentication_string  from  user ;
+---------------+-------------------------------------------+
| user          | authentication_string                     |
+---------------+-------------------------------------------+
| root          | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 |
| mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| mysql.sys     | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| root          | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 |
+---------------+-------------------------------------------+
4 rows in set (0.00 sec)

mysql>


mysql> quit
Bye 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章