1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
| [iyunv@ip-10-10-240-21 tmp]# ll
total 16
lrwxrwxrwx 1 root root 30 Jul 13 22:27 mysql.sock -> /data/mysql/datadir/mysql.sock
-rw------- 1 root root 256 Jul 10 06:07 tmp.0PLkgCq81n
-rw------- 1 root root 197 Jul 9 05:35 yum_save_tx-2014-07-09-09-35ibcBiO.yumtx
-rw-rw-r-- 1 zabbix zabbix 320 Jul 10 21:39 zabbix_agentd.log
-rw-rw-r-- 1 zabbix zabbix 5 Jul 10 21:39 zabbix_agentd.pid
[iyunv@ip-10-10-240-21 tmp]# ps -ef|grep mysql
root 21333 1 0 22:27 ? 00:00:00 /bin/sh /data/mysql/basedir/bin/mysqld_safe --defaults-file=/data/mysql/datadir/my.cnf --datadir=/data/mysql/datadir --pid-file=/data/mysql/datadir/mysql.pid
mysql 22156 21333 2 22:27 ? 00:00:08 /data/mysql/basedir/bin/mysqld --defaults-file=/data/mysql/datadir/my.cnf --basedir=/data/mysql/basedir --datadir=/data/mysql/datadir --plugin-dir=/data/mysql/basedir/lib/plugin --user=mysql --log-error=/data/mysql/datadir/mysql-error.log --open-files-limit=10240 --pid-file=/data/mysql/datadir/mysql.pid --socket=/data/mysql/datadir/mysql.sock --port=3306
root 22440 20233 0 22:33 pts/0 00:00:00 grep mysql
[iyunv@ip-10-10-240-21 tmp]# ll /data/mysql/
total 8
drwxr-xr-x 13 mysql mysql 4096 Jun 26 03:59 basedir
drwxr-xr-x 4 mysql mysql 4096 Jul 13 22:28 datadir
[iyunv@ip-10-10-240-21 tmp]# ll /etc/init.d/mysqld
-rwxr-xr-x 1 root root 10905 Jul 13 22:27 /etc/init.d/mysqld
[iyunv@ip-10-10-240-21 tmp]# /etc/init.d/mysqld status
MySQL (Percona Server) running (22156) [ OK ]
[iyunv@ip-10-10-240-21 tmp]# chkconfig --list|grep mysql
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[iyunv@ip-10-10-240-21 tmp]# mysql -h 192.168.240.17 -u root -pE4yR3WnoluSFTCBAI
ERROR 1045 (28000): Access denied for user 'root'@'192.168.240.17' (using password: YES)
[iyunv@ip-10-10-240-21 tmp]# mysql -h 10.10.240.21 -u root -pE4yR3WnoluSFTCBAI
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.5.21-log Source distribution
Copyright (c) 2000, 2011, 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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
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> select host,user,password from user;
+--------------+--------+-------------------------------------------+
| host | user | password |
+--------------+--------+-------------------------------------------+
| 10.10.240.21 | root | *BE78618CBAFFF409CE17D81579C1678B94439BE1 |
| % | zabbix | *DEEF4D7D88CD046ECA02A80393B7780A63E7E789 |
+--------------+--------+-------------------------------------------+
2 rows in set (0.00 sec)
|