当前位置: 首页 > wzjs >正文

专业网站策划公司网站制作出名的公司

专业网站策划公司,网站制作出名的公司,类似淘宝的购物网站 建设,wordpress注册页面插件本文环境:CentOS7、mysql-8.0.26 使用FinalShell或者XShell连接Linux服务器,然后把网上下的MySQL的tar包传进去,我用的是mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar。 进入服务器以后创建一个临时文件夹用来解压文件夹 cd /tmpmkdir /temp…

本文环境:CentOS7、mysql-8.0.26

使用FinalShell或者XShell连接Linux服务器,然后把网上下的MySQL的tar包传进去,我用的是mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar

进入服务器以后创建一个临时文件夹用来解压文件夹

cd /tmpmkdir /tempDatacd /tempData# 把tar包传到/tmp/tempData以后,在这里创建一个文件夹然后解压tar包
mkdir mysql
# 下面的tar包记得替换成自己的,这里会把tar包解压到刚创建的mysql文件夹里
tar -xvf mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar -C mysqlcd mysql
# 现在的mysql文件夹里有一堆rpm文件,这里需要按照一定的顺序安装才行
rpm -ivh mysql-community-common-8.0.26-1.el7.x86_64.rpmrpm -ivh mysql-community-client-plugins-8.0.26-1.el7.x86_64.rpm
# 下面这行执行如果报错,需要执行【rpm -e mariadb-libs --nodeps】命令然后再执行下面这行命令
rpm -ivh mysql-community-libs-8.0.26-1.el7.x86_64.rpmrpm -ivh mysql-community-libs-compat-8.0.26-1.el7.x86_64.rpm
# 执行下面的命令,安装openssl-devel,但是现在的CentOS7仓库据说是不提供支持了,可能会报错,报错信息和解决方案在文章下面,把仓库源换成阿里的就行(其他能用的仓库也可以)
yum install openssl-develrpm -ivh  mysql-community-devel-8.0.26-1.el7.x86_64.rpmrpm -ivh mysql-community-client-8.0.26-1.el7.x86_64.rpmrpm -ivh  mysql-community-server-8.0.26-1.el7.x86_64.rpm# 总结一下安装顺序
common -> client-plugins -> libs -> libs-compat -> devel -> client -> server# 其中安装libs可能会报依赖错误,这时候执行一次【rpm -e mariadb-libs --nodeps】再安装libs就好
# 另外安装devel之前要先安装openssl-devel# 上面的rpm安装完毕没问题了就可以启动mysql了
systemctl start mysqld
# 在windows安装MySQL的时候,大家可能碰到过设置密码的时候,但是linux安装rpm的时候是没有设置密码这个流程的,系统会随机生成一个文件,我们通过下列命令查找生成的随机密码
grep 'temporary password' /var/log/mysqld.log# 这时候我这边显示这样的信息
2025-03-19T15:23:19.674016Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: =qx_Qtd#%3c7# 密码就是=qx_Qtd#%3c7
# 知道密码以后可以连接数据库了
mysql -u root -p=qx_Qtd#%3c7# 如果此时你尝试创建数据库
create database test;
# 你会直接收到一个错误提示:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
# 解决方法很简单,就是把初始化的密码改一下,然后就可以正常使用mysql了
# 但是mysql对密码有校验规则和长度限制,如果你想要使用简单的密码比如123456,那就先降低规则限制
# 在mysql客户端执行下面语句
# 降低规则限制
set global validate_password.policy=0;
# 降低长度限制
set global validate_password.length=6;
# 设置新密码
alter user 'root'@'localhost' identified by '123456';
# 然后就可以正常创建数据库和表了# 这时候只能本机连接使用mysql,可以查看user信息,都是被限制在了localhost
select * from mysql.user\G;
# 可以自己创建一个叫root的用户,%代表任何主机都可以访问,密码是123456
create user 'root'@'%' identified by '123456';
# 刚创建的用户是没有任何权限的,需要分配权限,可以把最高权限all分配给'root'@'%',前面的on *.*代表在任何数据库任何表下都是有all权限,这里可以指定具体的库和表
grant all on *.* to 'root'@'%'# 如果你想要让其他机器连接数据库,那就得先把端口开放,默认端口3306是不开放的。
# 配置防火墙开放端口3306
sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent
# 重新加载防火墙配置
sudo firewall-cmd --reload# 当你想远程连接数据库的时候,使用下列命令
mysql -h192.168.179.132 -uroot -p123456
# -h指的是host,输入服务器ip
# -u指的是user,输入用户名
# -p指的是password,输入密码
# 如果数据库不是运行在3306端口的,需要指定-P,这里是大写的P,指的是Port端口号# 到这步已经可以正常使用数据库了,你可以用选择你喜欢的各种可视化工具

执行【yum install openssl-devel】发生的报错如下

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"One of the configured repositories failed (Unknown),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=trueCannot find a valid baseurl for repo: base/7/x86_64

解决方法如下(注意:阿里云的镜像在本文发布2025/03/20时依然能用,但是不确保以后这个仓库地址不会变动或者遗弃)

# 下载阿里云的配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
http://www.dtcms.com/wzjs/583.html

相关文章:

  • javaee做视频网站seo基本步骤
  • 网站配色 原则汕头seo全网营销
  • 汽车网站建设论文关键词林俊杰百度云
  • 网站电线电话图怎么做热门关键词排名查询
  • 网站分级怎么做论坛发帖
  • php酒店网站源码关键词整站优化公司
  • 爱站网络科技有限公司推广网站排名
  • java做网站有什么优势杭州seo推广优化公司
  • 邮箱的官方网站注册抖音seo排名
  • 我想弄个自己的卖货网站怎样做怎么从网上找国外客户
  • 展示型网站建设方案书百度代理公司查询
  • wordpress建站赚钱广告seo是什么意思
  • 设计制作社会实践活动内容企业网站的优化建议
  • 无锡哪里有网站建设便宜些的中文域名注册官网入口
  • 宣传片拍摄方案怎么写保定seo网站推广
  • 民治做网站的公司南京响应式网站建设
  • 购物网站建设公司网络推广员要怎么做
  • 用java做网站后台怎么样百分百营销软件官网
  • 电商网站开发ssm框架拉新平台
  • wordpress 生成poseo怎样
  • 网店美工毕业设计论文东莞百度推广排名优化
  • 做网站的安全证书南宁seo推广服务
  • 中国建设银行企业门户网站百度如何优化排名靠前
  • 单纯python能完成网站开发吗搜索引擎营销策略有哪些
  • 百度竞价做网站seo代理计费系统
  • flash网站引导页成全视频免费观看在线看
  • 项目网站设计如何做宣传推广效果最好
  • 石家庄专门做网站的公司广州网站优化多少钱
  • 建设企业网站企业网银如何外贸推广
  • 网络广告设计制作网络优化是干什么的