MySQL数据库操作起来命令较多,默认无法使用tab键进行补全,所以可以安装一些实用的工具进行日常的操作
mysql -u root -p --auto-rehash
vi /etc/my.cnf
[mysql]
auto-rehash
#如果之前移动过本地.repo文件需要先将本地的.repo释放出来
mysqladmin -u root -p password "密码" #安装好mysql需要设置登录密码
mysql -u root -p
grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘密码‘; #登录数据授权root可以再所有终端登录并有所有的权限,不然后面无法使用该工具
#安装环境依赖包
yum -y install epel-release
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gcc
wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz
mkdir ~/.pip/
cat > ~/.pip/pip.conf <<EOF [global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com EOF
yum -y install libffi-devel zlib* python-devel openssl-devel
tar -zxvf Python-3.9.0.tgz
cd Python-3.9.0/
./configure --prefix=/usr/local/python --with-ssl
make -j 2 && make install
ln -s /usr/local/python/bin/python3 /usr/bin/
echo ‘export PATH=/usr/local/python/bin:$PATH‘ >> /etc/profile
source /etc/profile
pip3 install mycli
mycli -u root -p<密码>
原文:https://www.cnblogs.com/pengdi/p/15187410.html