Linux连接MySQL

注意:绿色代表对Linux中的命令解析

黄色代表要输入执行的命令

-rw-r--r--. 1 root root 970 8月 6 2017 yum.conf

drwxr-xr-x. 2 root root 250 2月 21 18:16 yum.repos.d

解析

- : 软连接 d:硬连接 r:表示可阅读 w:表示可写 x:表示可执行

区别:1、软链接是以路径的形式存在;硬链接是以文件副本的形式存在,但不占用实际空间。2、软链接可以跨文件系统;硬链接不可以。3、软链接可以对目录进行链接;不允许给目录创建硬链接。

软链接:

1.软链接,以路径的形式存在。类似于Windows操作系统中的快捷方式

2.软链接可以 跨文件系统 ,硬链接不可以

3.软链接可以对一个不存在的文件名进行链接

4.软链接可以对目录进行链接

硬链接:

1.硬链接,以文件副本的形式存在。但不占用实际空间。

2.不允许给目录创建硬链接

3.硬链接只有在同一个文件系统中才能创建

---首先以root的身份登录虚拟机打开终端

[root@localhost ~]# ll

解析

[root@localhost ~]# ll ----查找所有文件

总用量 12

-rw-------. 1 root root 2754 1月 4 11:12 anaconda-ks.cfg

drwxr-xr-x. 2 root root 6 1月 4 11:24 Desktop

drwxr-xr-x. 2 root root 6 1月 4 11:24 Documents

drwxr-xr-x. 2 root root 6 1月 4 11:24 Downloads

-rw-r--r--. 1 root root 0 2月 21 15:08 home

-rw-r--r--. 1 root root 2758 1月 4 11:17 initial-setup-ks.cfg

drwxr-xr-x. 2 root root 6 1月 4 11:24 Music

drwxr-xr-x. 3 root root 55 1月 4 20:02 myTomcat

-rw-------. 1 root root 2034 1月 4 11:12 original-ks.cfg

drwxr-xr-x. 2 root root 6 1月 4 11:24 Pictures

drwxr-xr-x. 2 root root 6 1月 4 11:24 Public

drwxr-xr-x. 2 root root 6 1月 4 11:24 Templates

drwxr-xr-x. 3 root root 16 2月 16 20:00 user

drwxr-xr-x. 2 root root 6 1月 4 11:24 Videos

[root@localhost ~]# cd /home

解析

[root@localhost ~]# cd /home ----切换到home目录下

[root@localhost home]# cd /bin

解析

[root@localhost home]# cd /bin ---切换到bin目录下

[root@localhost bin]# yum -y install wget

解析

[root@localhost bin]# yum -y install wget ---安装mysql

已加载插件:fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base: mirrors.aliyun.com

* extras: mirrors.aliyun.com

* updates: mirrors.aliyun.com

软件包 wget-1.14-18.el7_6.1.x86_64 已安装并且是最新版本

无须任何处理

[root@localhost bin]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

解析

[root@localhost bin]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm ----下载mysql的repo源

--2022-02-21 18:29:31-- http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

正在解析主机 repo.mysql.com (repo.mysql.com)... 104.76.200.230

正在连接 repo.mysql.com (repo.mysql.com)|104.76.200.230|:80... 已连接。

已发出 HTTP 请求,正在等待回应... 200 OK

长度:6140 (6.0K) [application/x-redhat-package-manager]

正在保存至: “mysql-community-release-el7-5.noarch.rpm”

100%[===================================================>] 6,140 --.-K/s 用时 0.006s

2022-02-21 18:29:31 (1.04 MB/s) - 已保存 “mysql-community-release-el7-5.noarch.rpm” [6140/6140])

[root@localhost bin]# which wget

解析

下载mysql的repo源 ----查看wget路径

/usr/bin/wget

[root@localhost bin]# rpm -ivh mysql-community-release-el7-5.noarch.rpm

解析

[root@localhost bin]# rpm -ivh mysql-community-release-el7-5.noarch.rpm ----安装mysql-community-release-el7-5.noarch.rpm包

准备中... ################################# [100%]

软件包 mysql-community-release-el7-5.noarch 已经安装

[root@localhost bin]# ls -1 /etc/yum.repos.d/mysql-community*

解析

[root@localhost bin]# ls -1 /etc/yum.repos.d/mysql-community* ---查看下 会获得两个mysql的yumrepo源:

/etc/yum.repos.d/mysql-community.repo

/etc/yum.repos.d/mysql-community-source.repo

[root@localhost bin]# yum -y install mysql-server

解析

[root@localhost bin]# yum -y install mysql-server ----安装mysql

已加载插件:fastestmirror, langpacks

Loading mirror speeds from cached hostfile

* base: mirrors.neusoft.edu.cn

* extras: mirrors.neusoft.edu.cn

* updates: mirrors.neusoft.edu.cn

软件包 mysql-community-server-5.6.51-2.el7.x86_64 已安装并且是最新版本

无须任何处理

[root@localhost bin]# mv /etc/my.cnf /home

[root@localhost bin]# cd /etc

解析

[root@localhost bin]# cd /etc ---切换到etc目录下

---在这之前要到如my.cnf图片文件

[root@localhost etc]# rz

解析

[root@localhost etc]# rz ---上传my.cnf文件

[root@localhost etc]# ll

解析

[root@localhost etc]# ll ---查看etc同级目录下的文件

总用量 1404

drwxr-xr-x. 3 root root 101 1月 4 11:05 abrt

-rw-r--r--. 1 root root 16 1月 4 11:11 adjtime

-rw-r--r--. 1 root root 1518 6月 7 2013 aliases

-rw-r--r--. 1 root root 12288 1月 4 11:13 aliases.db

drwxr-xr-x. 2 root root 51 1月 4 11:06 alsa

drwxr-xr-x. 2 root root 4096 2月 21 15:49 alternatives

-rw-------. 1 root root 541 8月 3 2017 anacrontab

-rw-r--r--. 1 root root 55 3月 1 2017 asound.conf

-rw-r--r--. 1 root root 1 11月 6 2016 at.deny

drwxr-x---. 3 root root 43 1月 4 11:06 audisp

drwxr-x---. 3 root root 83 1月 4 11:13 audit

-rw-r--r--. 1 root root 14392 8月 4 2017 autofs.conf

-rw-------. 1 root root 232 8月 4 2017 autofs_ldap_auth.conf

-rw-r--r--. 1 root root 795 8月 4 2017 auto.master

drwxr-xr-x. 2 root root 6 8月 4 2017 auto.master.d

-rw-r--r--. 1 root root 524 8月 4 2017 auto.misc

-rwxr-xr-x. 1 root root 1260 8月 4 2017 auto.net

-rwxr-xr-x. 1 root root 687 8月 4 2017 auto.smb

drwxr-xr-x. 4 root root 71 1月 4 11:07 avahi

drwxr-xr-x. 2 root root 4096 1月 4 11:08 bash_completion.d

-rw-r--r--. 1 root root 2853 11月 6 2016 bashrc

drwxr-xr-x. 2 root root 6 8月 5 2017 binfmt.d

drwxr-xr-x. 2 root root 23 1月 4 11:05 bluetooth

drwxr-xr-x. 2 root root 12288 1月 4 11:06 brltty

-rw-r--r--. 1 root root 21929 8月 7 2017 brltty.conf

-rw-r--r--. 1 root root 38 8月 30 2017 centos-release

-rw-r--r--. 1 root root 51 8月 30 2017 centos-release-upstream

drwxr-xr-x. 2 root root 29 1月 4 11:06 certmonger

-rw-r--r--. 1 root root 676 8月 3 2017 cgconfig.conf

drwxr-xr-x. 2 root root 6 8月 3 2017 cgconfig.d

-rw-r--r--. 1 root root 265 1月 4 11:07 cgrules.conf

-rw-r--r--. 1 root root 131 8月 3 2017 cgsnapshot_blacklist.conf

drwxr-xr-x. 2 root root 6 8月 4 2017 chkconfig.d

-rw-r--r--. 1 root root 1108 1月 31 2017 chrony.conf

-rw-r-----. 1 root chrony 481 1月 31 2017 chrony.keys

drwxr-xr-x. 2 root root 26 1月 4 11:07 cifs-utils

drwxr-xr-x. 2 root root 54 1月 4 11:07 cron.d

drwxr-xr-x. 2 root root 57 1月 4 11:07 cron.daily

-rw-------. 1 root root 0 8月 3 2017 cron.deny

drwxr-xr-x. 2 root root 22 6月 10 2014 cron.hourly

drwxr-xr-x. 2 root root 6 6月 10 2014 cron.monthly

-rw-r--r--. 1 root root 451 6月 10 2014 crontab

drwxr-xr-x. 2 root root 6 6月 10 2014 cron.weekly

-rw-------. 1 root root 0 1月 4 11:03 crypttab

-rw-r--r--. 1 root root 1620 11月 6 2016 csh.cshrc

-rw-r--r--. 1 root root 841 6月 7 2013 csh.login

drwxr-xr-x. 5 root lp 4096 2月 21 18:46 cups

drwxr-xr-x. 2 root root 34 1月 4 11:06 cupshelpers

drwxr-xr-x. 4 root root 78 1月 4 11:05 dbus-1

drwxr-xr-x. 4 root root 31 1月 4 11:05 dconf

drwxr-xr-x. 2 root root 44 1月 4 11:11 default

drwxr-xr-x. 2 root root 23 1月 4 11:05 depmod.d

drwxr-x---. 4 root root 53 1月 4 11:05 dhcp

-rw-r--r--. 1 root root 5090 11月 5 2016 DIR_COLORS

-rw-r--r--. 1 root root 5725 11月 5 2016 DIR_COLORS.256color

-rw-r--r--. 1 root root 4669 11月 5 2016 DIR_COLORS.lightbgcolor

-rw-r--r--. 1 root root 1174 8月 3 2017 dleyna-server-service.conf

-rw-r--r--. 1 root root 26832 8月 3 2017 dnsmasq.conf

drwxr-xr-x. 2 root root 6 8月 3 2017 dnsmasq.d

-rw-r--r--. 1 root root 1285 8月 5 2017 dracut.conf

drwxr-xr-x. 2 root root 6 8月 5 2017 dracut.conf.d

-rw-r--r--. 1 root root 4676 8月 4 2017 drirc

-rw-r--r--. 1 root root 112 3月 16 2017 e2fsck.conf

-rw-r--r--. 1 root root 4760 6月 10 2014 enscript.cfg

-rw-r--r--. 1 root root 0 11月 6 2016 environment

-rw-r--r--. 1 root root 1317 11月 6 2016 ethertypes

-rw-r--r--. 1 root root 0 6月 7 2013 exports

drwxr-xr-x. 2 root root 6 8月 8 2017 exports.d

lrwxrwxrwx. 1 root root 56 1月 4 11:05 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png

drwxr-xr-x. 2 root root 22 1月 4 11:06 fcoe

drwxr-xr-x. 2 root root 46 1月 4 11:05 festival

-rw-r--r--. 1 root root 70 11月 6 2016 filesystems

drwxr-xr-x. 3 root root 18 1月 4 11:07 firefox

drwxr-x---. 7 root root 133 1月 4 11:05 firewalld

drwxr-xr-x. 3 root root 23 1月 4 11:06 flatpak

drwxr-xr-x. 3 root root 38 1月 4 11:05 fonts

-rw-r--r--. 1 root root 20 6月 24 2014 fprintd.conf

-rw-r--r--. 1 root root 501 1月 4 11:03 fstab

-rw-r--r--. 1 root root 38 5月 2 2017 fuse.conf

drwxr-xr-x. 7 root root 107 1月 4 11:05 gconf

drwxr-xr-x. 2 root root 6 8月 2 2017 gcrypt

-rw-r--r--. 1 root root 265 6月 14 2017 gdbinit

drwxr-xr-x. 2 root root 6 6月 14 2017 gdbinit.d

drwxr-xr-x. 6 root root 107 1月 4 11:06 gdm

drwxr-xr-x. 2 root root 26 1月 4 11:06 geoclue

-rw-r--r--. 1 root root 842 11月 6 2016 GeoIP.conf

-rw-r--r--. 1 root root 858 11月 6 2016 GeoIP.conf.default

drwxr-xr-x. 3 root root 18 1月 4 11:06 ghostscript

drwxr-xr-x. 2 root root 6 11月 6 2016 gnupg

-rw-r--r--. 1 root root 94 3月 25 2017 GREP_COLORS

drwxr-xr-x. 4 root root 40 1月 4 11:04 groff

-rw-r--r--. 1 root root 922 2月 21 18:18 group

-rw-r--r--. 1 root root 910 1月 4 11:12 group-

lrwxrwxrwx. 1 root root 22 1月 4 11:05 grub2.cfg -> ../boot/grub2/grub.cfg

drwx------. 2 root root 182 1月 4 11:11 grub.d

----------. 1 root root 740 2月 21 18:18 gshadow

----------. 1 root root 730 1月 4 11:12 gshadow-

drwxr-xr-x. 3 root root 20 1月 4 11:05 gss

drwxr-xr-x. 2 root root 79 1月 4 11:06 gssproxy

-rw-r--r--. 1 root root 9 6月 7 2013 host.conf

-rw-r--r--. 1 root root 22 1月 4 11:11 hostname

-rw-r--r--. 1 root root 158 6月 7 2013 hosts

-rw-r--r--. 1 root root 370 6月 7 2013 hosts.allow

-rw-r--r--. 1 root root 460 6月 7 2013 hosts.deny

drwxr-xr-x. 2 root root 24 1月 4 11:06 hp

-rw-r--r--. 1 root root 4849 8月 2 2017 idmapd.conf

lrwxrwxrwx. 1 root root 11 1月 4 11:04 init.d -> rc.d/init.d

-rw-r--r--. 1 root root 511 8月 4 2017 inittab

-rw-r--r--. 1 root root 942 6月 7 2013 inputrc

drwxr-xr-x. 3 root root 19 1月 4 11:04 ipa

drwxr-xr-x. 2 root root 140 1月 4 11:04 iproute2

-rw-r--r--. 1 root root 2050 8月 5 2017 ipsec.conf

drwx------. 3 root root 50 1月 4 11:06 ipsec.d

-rw-------. 1 root root 31 8月 5 2017 ipsec.secrets

drwxr-xr-x. 2 root root 52 1月 4 11:05 iscsi

-rw-r--r--. 1 root root 23 8月 30 2017 issue

-rw-r--r--. 1 root root 22 8月 30 2017 issue.net

drwxr-xr-x. 3 root root 62 1月 4 11:05 java

drwxr-xr-x. 2 root root 6 11月 21 2015 jvm

drwxr-xr-x. 2 root root 6 11月 21 2015 jvm-commmon

-rw-r--r--. 1 root root 7265 1月 4 11:05 kdump.conf

drwxr-xr-x. 3 root root 24 1月 4 11:07 kernel

-rw-r--r--. 1 root root 590 4月 29 2017 krb5.conf

drwxr-xr-x. 2 root root 6 8月 4 2017 krb5.conf.d

-rw-r--r--. 1 root root 478 6月 13 2017 ksmtuned.conf

-rw-r--r--. 1 root root 73889 2月 21 18:19 ld.so.cache

-rw-r--r--. 1 root root 28 2月 28 2013 ld.so.conf

drwxr-xr-x. 2 root root 127 2月 21 18:19 ld.so.conf.d

-rw-r-----. 1 root root 191 4月 19 2017 libaudit.conf

drwxr-xr-x. 2 root root 249 1月 4 11:05 libibverbs.d

drwxr-xr-x. 2 root root 35 1月 4 11:04 libnl

drwxr-xr-x. 6 root root 149 1月 4 11:05 libreport

-rw-r--r--. 1 root root 2388 1月 4 11:11 libuser.conf

drwx------. 4 root root 184 1月 4 11:06 libvirt

-rw-r--r--. 1 root root 17 1月 4 11:24 locale.conf

lrwxrwxrwx. 1 root root 35 1月 4 11:23 localtime -> ../usr/share/zoneinfo/Asia/Shanghai

-rw-r--r--. 1 root root 2043 1月 4 11:11 login.defs

-rw-r--r--. 1 root root 662 7月 31 2013 logrotate.conf

drwxr-xr-x. 2 root root 243 2月 21 18:18 logrotate.d

drwxr-xr-x. 3 root root 43 1月 4 11:05 lsm

drwxr-xr-x. 6 root root 100 1月 4 11:05 lvm

-r--r--r--. 1 root root 33 1月 4 11:05 machine-id

-rw-r--r--. 1 root root 111 11月 6 2016 magic

-rw-r--r--. 1 root root 1968 8月 3 2017 mail.rc

-rw-r--r--. 1 root root 5122 8月 7 2017 makedumpfile.conf.sample

-rw-r--r--. 1 root root 5171 6月 10 2014 man_db.conf

drwxr-xr-x. 2 root root 6 11月 21 2015 maven

-rw-r--r--. 1 root root 936 8月 3 2017 mke2fs.conf

drwxr-xr-x. 2 root root 81 1月 4 11:07 modprobe.d

drwxr-xr-x. 2 root root 6 8月 5 2017 modules-load.d

-rw-r--r--. 1 root root 0 6月 7 2013 motd

lrwxrwxrwx. 1 root root 17 1月 4 11:03 mtab -> /proc/self/mounts

-rw-r--r--. 1 root root 2620 6月 10 2014 mtools.conf

drwxr-xr-x. 2 root root 6 8月 4 2017 multipath

-rw-r--r--. 1 root root 433 2月 21 18:46 my.cnf

drwxr-xr-x. 2 root root 6 2月 21 18:19 my.cnf.d

-rw-r--r--. 1 root root 8892 6月 10 2014 nanorc

-rw-r--r--. 1 root root 767 8月 4 2017 netconfig

drwxr-xr-x. 8 root root 145 1月 4 11:07 NetworkManager

-rw-r--r--. 1 root root 58 8月 4 2017 networks

-rw-r--r--. 1 root root 955 8月 8 2017 nfs.conf

-rw-r--r--. 1 root root 3390 8月 8 2017 nfsmount.conf

-rw-r--r--. 1 root root 1746 1月 4 11:05 nsswitch.conf

-rw-r--r--. 1 root root 1735 8月 2 2017 nsswitch.conf.bak

drwxr-xr-x. 3 root root 52 1月 4 11:06 ntp

-rw-r--r--. 1 root root 2000 4月 12 2017 ntp.conf

-rw-r--r--. 1 root root 91 12月 3 2012 numad.conf

drwxr-xr-x. 2 root root 6 3月 6 2015 oddjob

-rw-r--r--. 1 root root 4922 3月 6 2015 oddjobd.conf

drwxr-xr-x. 2 root root 70 1月 4 11:06 oddjobd.conf.d

drwxr-xr-x. 3 root root 36 1月 4 11:11 openldap

drwxr-xr-x. 2 root root 6 11月 5 2016 opt

-rw-r--r--. 1 root root 393 8月 30 2017 os-release

drwxr-xr-x. 2 root root 92 1月 4 11:07 PackageKit

drwxr-xr-x. 2 root root 4096 1月 4 11:11 pam.d

-rw-r--r--. 1 root root 2151 2月 21 18:18 passwd

-rw-r--r--. 1 root root 2099 1月 4 11:12 passwd-

-rw-r--r--. 1 root root 1362 6月 10 2014 pbm2ppa.conf

-rw-r--r--. 1 root root 2872 6月 10 2014 pinforc

drwxr-xr-x. 3 root root 21 1月 4 11:04 pkcs11

drwxr-xr-x. 10 root root 116 1月 4 11:07 pki

drwxr-xr-x. 2 root root 28 1月 4 11:05 plymouth

drwxr-xr-x. 5 root root 52 1月 4 11:04 pm

-rw-r--r--. 1 root root 6300 6月 10 2014 pnm2ppa.conf

drwxr-xr-x. 5 root root 72 1月 4 11:05 polkit-1

drwxr-xr-x. 2 root root 6 6月 10 2014 popt.d

drwxr-xr-x. 2 root root 154 1月 4 11:07 postfix

drwxr-xr-x. 3 root root 219 1月 4 11:05 ppp

drwxr-xr-x. 2 root root 105 1月 4 11:06 prelink.conf.d

-rw-r--r--. 1 root root 233 6月 7 2013 printcap

-rw-r--r--. 1 root root 2012 2月 21 15:45 profile

drwxr-xr-x. 2 root root 4096 1月 4 11:07 profile.d

-rw-r--r--. 1 root root 6545 6月 7 2013 protocols

drwxr-xr-x. 2 root root 79 1月 4 11:06 pulse

drwxr-xr-x. 2 root root 23 1月 4 11:06 purple

drwxr-xr-x. 2 root root 35 1月 4 11:05 python

drwxr-xr-x. 3 root root 50 1月 4 11:07 qemu-ga

drwxr-xr-x. 2 root root 51 1月 4 11:07 qemu-kvm

-rw-r--r--. 1 root root 433 9月 9 2015 radvd.conf

lrwxrwxrwx. 1 root root 10 1月 4 11:04 rc0.d -> rc.d/rc0.d

lrwxrwxrwx. 1 root root 10 1月 4 11:04 rc1.d -> rc.d/rc1.d

lrwxrwxrwx. 1 root root 10 1月 4 11:04 rc2.d -> rc.d/rc2.d

lrwxrwxrwx. 1 root root 10 1月 4 11:04 rc3.d -> rc.d/rc3.d

lrwxrwxrwx. 1 root root 10 1月 4 11:04 rc4.d -> rc.d/rc4.d

lrwxrwxrwx. 1 root root 10 1月 4 11:04 rc5.d -> rc.d/rc5.d

lrwxrwxrwx. 1 root root 10 1月 4 11:04 rc6.d -> rc.d/rc6.d

drwxr-xr-x. 10 root root 127 1月 4 11:13 rc.d

lrwxrwxrwx. 1 root root 13 1月 4 11:05 rc.local -> rc.d/rc.local

drwxr-xr-x. 2 root root 79 1月 4 11:05 rdma

lrwxrwxrwx. 1 root root 14 1月 4 11:04 redhat-release -> centos-release

-rw-r--r--. 1 root root 1787 6月 10 2014 request-key.conf

drwxr-xr-x. 2 root root 77 1月 4 11:07 request-key.d

-rw-r--r--. 1 root root 73 2月 21 17:29 resolv.conf

-rw-r--r--. 1 root root 1634 12月 25 2012 rpc

drwxr-xr-x. 2 root root 128 1月 4 11:05 rpm

-rw-r--r--. 1 root root 458 8月 2 2017 rsyncd.conf

-rw-r--r--. 1 root root 3232 5月 10 2017 rsyslog.conf

drwxr-xr-x. 2 root root 25 8月 7 2017 rsyslog.d

-rw-r--r--. 1 root root 966 8月 4 2017 rwtab

drwxr-xr-x. 2 root root 35 1月 4 11:05 rwtab.d

drwxr-xr-x. 2 root root 61 1月 4 11:05 samba

drwxr-xr-x. 3 root root 4096 1月 4 11:06 sane.d

drwxr-xr-x. 2 root root 65 1月 4 11:07 sasl2

drwxr-xr-x. 3 root root 34 1月 4 11:08 scl

-rw-------. 1 root root 221 11月 6 2016 securetty

drwxr-xr-x. 6 root root 4096 1月 4 11:05 security

drwxr-xr-x. 5 root root 81 1月 4 11:05 selinux

-rw-r--r--. 1 root root 670293 6月 7 2013 services

-rw-r--r--. 1 root root 216 8月 4 2017 sestatus.conf

drwxr-xr-x. 2 root root 33 1月 4 11:06 setroubleshoot

drwxr-xr-x. 2 root root 4096 1月 4 11:07 setuptool.d

drwxr-xr-x. 3 root root 21 1月 4 11:04 sgml

----------. 1 root root 1076 2月 21 18:18 shadow

----------. 1 root root 1055 1月 4 11:12 shadow-

-rw-r--r--. 1 root root 95 1月 4 11:07 shells

drwxr-xr-x. 3 root root 78 1月 4 11:04 skel

drwxr-xr-x. 3 root root 74 1月 4 11:07 smartmontools

-rw-r--r--. 1 root root 100 8月 10 2017 sos.conf

drwxr-xr-x. 4 root root 56 1月 4 11:06 speech-dispatcher

drwxr-xr-x. 2 root root 225 1月 4 11:13 ssh

drwxr-xr-x. 2 root root 19 1月 4 11:04 ssl

drwx--x--x. 3 sssd sssd 20 1月 4 11:05 sssd

-rw-r--r--. 1 root root 212 8月 4 2017 statetab

drwxr-xr-x. 2 root root 6 8月 4 2017 statetab.d

-rw-r--r--. 1 root root 0 11月 6 2016 subgid

-rw-r--r--. 1 root root 0 11月 6 2016 subuid

-rw-r-----. 1 root root 1786 6月 7 2017 sudo.conf

-r--r-----. 1 root root 3938 6月 7 2017 sudoers

drwxr-x---. 2 root root 6 8月 4 2017 sudoers.d

-rw-r-----. 1 root root 3181 6月 7 2017 sudo-ldap.conf

drwxr-xr-x. 6 root root 4096 1月 4 11:12 sysconfig

-rw-r--r--. 1 root root 449 8月 4 2017 sysctl.conf

drwxr-xr-x. 2 root root 28 1月 4 11:05 sysctl.d

drwxr-xr-x. 4 root root 151 1月 4 11:05 systemd

lrwxrwxrwx. 1 root root 14 1月 4 11:04 system-release -> centos-release

-rw-r--r--. 1 root root 23 8月 30 2017 system-release-cpe

drwxr-xr-x. 3 root root 20 1月 4 11:06 target

-rw-------. 1 tss tss 7046 8月 4 2017 tcsd.conf

drwxr-xr-x. 2 root root 6 6月 11 2014 terminfo

drwxr-xr-x. 2 root root 6 8月 5 2017 tmpfiles.d

-rw-r--r--. 1 root root 750 8月 4 2017 trusted-key.key

drwxr-xr-x. 2 root root 70 1月 4 11:07 tuned

drwxr-xr-x. 3 root root 54 1月 4 11:12 udev

drwxr-xr-x. 2 root root 6 11月 20 2015 udisks2

-rw-r--r--. 1 root root 513 11月 5 2016 updatedb.conf

drwxr-xr-x. 2 root root 25 1月 4 11:06 UPower

-rw-r--r--. 1 root root 1018 11月 6 2016 usb_modeswitch.conf

-rw-r--r--. 1 root root 37 1月 4 11:11 vconsole.conf

-rw-r--r--. 1 root root 1982 8月 2 2017 vimrc

-rw-r--r--. 1 root root 1982 8月 2 2017 virc

drwxr-xr-x. 5 root root 231 1月 4 11:06 vmware-tools

-rw-r--r--. 1 root root 4479 5月 16 2019 wgetrc

drwxr-xr-x. 2 root root 33 1月 4 11:05 wpa_supplicant

-rw-r--r--. 1 root root 0 6月 10 2014 wvdial.conf

drwxr-xr-x. 6 root root 103 1月 4 11:05 X11

drwxr-xr-x. 5 root root 99 1月 4 11:05 xdg

drwxr-xr-x. 2 root root 6 11月 5 2016 xinetd.d

drwxr-xr-x. 2 root root 21 1月 4 11:04 xml

drwxr-xr-x. 6 root root 100 1月 4 11:05 yum

-rw-r--r--. 1 root root 970 8月 6 2017 yum.conf

drwxr-xr-x. 2 root root 250 2月 21 18:16 yum.repos.d

[root@localhost etc]# ll my.cnf

解析

[root@localhost etc]# ll my.cnf ---查看是否导入了my.cnf文件

-rw-r--r--. 1 root root 433 2月 21 18:46 my.cnf

[root@localhost etc]# systemctl restart mysql.service

解析

[root@localhost etc]# systemctl restart mysql.service ----重启mysql

^C

[root@localhost etc]# ps aux|grep mysql

解析

[root@localhost etc]# ps aux|grep mysql ---查看mysql的进程

mysql 6795 0.1 0.1 113264 1620 ? Ss 18:49 0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr

mysql 7021 1.5 10.9 1028728 109912 ? Sl 18:49 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

root 7047 0.0 0.0 112676 976 pts/1 R+ 18:49 0:00 grep --color=auto mysql

[root@localhost etc]# mysql -u root -p

解析

[root@localhost etc]# mysql -u root -p ---打开mysql

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.6.51 MySQL Community Server (GPL)

Copyright (c) 2000, 2021, 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> exit

解析

mysql> exit ---退出mysql

Bye

[root@localhost etc]#

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值