下载地址:/d/file/titlepic/5.7.html 在线下载wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz
mkdir /usr/local/mysqlcd /usr/local/mysqltar -zxvf mysql-5.7.30-linux-glibc2.12-x86_64.tar # 改个名字mv mysql-5.7.30-linux-glibc2.12-x86_64 mysql-5.7.30
groupadd mysqluradd -r -g mysql mysql
mkdir -p /data/mysql #创建目录chown mysql:mysql -R /data/mysql #赋予权限
vim /etc何有/my.cnf
[mysqld]bind-address=0.0.0.0port=3306ur=mysqlbadir=/usr/local/mysql/mysql-5.7.30datadir=/data/mysqlsocket=/tmp/偶然的近义词mysql.socklog-error=/data/mysql/mysql.errpid-file=/data/mysql/mysql.pid#ch次磷酸aracter configcharacter_t_父亲给儿子的一封信rver=utf8mb4symbolic-links=0explicit_defaults_for_timestamp=true
进入mysql的bin目录
cd /usr/local/mysql/mysql-5.7.30/bin/
./mysqld --defaults-file=/etc/my.cnf --badir=/usr/local/mysql/ --datadir=/data/mysql/ --ur=mysql --initialize
cat /data/mysql/mysql.err
cp /usr/local/mysql/support-files/mysql.rver /etc/init.d/mysql
rvice mysql startps -ef | grep mysql
./mysql -u root -p #bin目录下
这里可能会报这个错误 ⇒ ./mysql: error while loading shared libraries: libncurs.so.5: cannot open shared object file: No such file or directory
解决方法: yum install libncurs*
SET PASSWORD = PASSWORD('123456');小学生写信的格式ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;FLUSH PRIVILEGES;
u mysql #访问mysql库update ur t host = '%' where ur = 'root'; #使root能再任何host访问FLUSH PRIVILEGES; #刷新
ln -s /usr/local/mysql/bin/mysql /usr/bin
=================================================================================
再次感谢原博主,贴上链接 https://blog.csdn.net/qq_37598011/article/details/93489404
本文地址:https://blog.csdn.net/weixin_43530295/article/details/107128872
本文发布于:2023-04-07 11:28:48,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/8a625f8b6febdc94a2b7bf4b92dc996b.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:Linux安装MySQL5.7「转」.doc
本文 PDF 下载地址:Linux安装MySQL5.7「转」.pdf
留言与评论(共有 0 条评论) |