mysql命令

Posted wanglinyan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql命令相关的知识,希望对你有一定的参考价值。

关闭防火墙和selinux:
systemctl stop firewalld.service
setenforce 0
永久关闭防火墙和selinux:
systemctl disable firewalld.service
sed -i ‘/^SELINUX/s#enforcing#disabled#g’ /etc/selinux/config
安装wget:
yum install -y wget
国内yum源:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
清除YUM缓存:
yum clean all
建立一个缓存:
yum makecache
安装一些基本命令
yum -y install gcc gcc-c++ cmake curl nmap lrzsz unzip zip ntpdate telnet vim tree bash-completion iptables-services ntp dos2unix lsof net-tools sysstat
同步时间,需要等5分钟:
echo “*/5 * * * * /usr/sbin/ntpdate ntp1.aliyun.com >/dev/null 2>&1”>>/var/spool/cron/root
同步时间:
/usr/sbin/ntpdate ntp1.aliyun.com
关闭图形
systemctl stop NetworkManager
永久关闭图形
systemctl disable NetworkManager

以上是关于mysql命令的主要内容,如果未能解决你的问题,请参考以下文章

如何使用mysql命令行

如何用mysql命令备份和恢复

MySQL命令大全:MySQL常用命令手册MySQL命令行大全查询工具

linux mysql启动命令(命令行启动mysql)

mysql 命令怎么 数据库设置密码

mysql怎么结束命令