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

南昌做网站后台投票wordpress 主查询

南昌做网站后台投票,wordpress 主查询,营销型网站设计建设公司,傻瓜app制作开发1.下载8.x版本的mysql MySQL :: Download MySQL Community Server (Archived Versions) 2.安装linux 我安装的是Rocky Linux8.6 3.设置ip地址,方便远程连接 使用nmcli或者nmtui设置或修改ip地址 4.使用远程连接工具MobaXterm操作: (1)将mysql8版本的压缩包上传到mybaxterm… 1.下载8.x版本的mysql MySQL :: Download MySQL Community Server (Archived Versions) 2.安装linux 我安装的是Rocky Linux8.6 3.设置ip地址,方便远程连接 使用nmcli或者nmtui设置或修改ip地址 4.使用远程连接工具MobaXterm操作: (1)将mysql8版本的压缩包上传到mybaxterm (2)解压缩 tar -Jxvf mysql-8.0.25-linux-glibc2.12-x86_64.tar.xz(3)移动压缩后的目录到/usr/local/,并改名为mysql 注意:修改权限mysql:mysql mv mysql-8.0.25-linux-glibc2.12-x86_64 /usr/local/mysql useradd mysql -s /sbin/nologin chown -R mysql.mysql /usr/local/mysql(4)cd /usr/local/mysql 创建配置文件/etc/my.cnf [rootlocalhost bin]# vim /etc/my.cnf [mysqld] log-error/usr/local/mysql/log/mysql.err basedir/usr/local/mysql datadir/usr/local/mysql/data socket/tmp/mysql.sock character-set-serverUTF8MB4创建必要的文件目录: mkdir /usr/local/mysql/{binlog,data,log,tmpdir,conf} -p利用配置文件初始化mysql [rootlocalhost mysql]# bin/mysqld \ --defaults-file/etc/my.cnf \ --usermysql \ --initialize初始化数据库,它会给出一个临时密码,记住它,后面要用,如果找不到了,需要走忘记密码流程 (5)启动mysql [rootlocalhost mysql]# support-files/mysql.server start如果是开启中的,启动需要重启mysql [rootlocalhost mysql]# support-files/mysql.server restart(6)处理报错 当执行bin/mysql -u root -p命令时,出现以下报错: mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory 解决办法: [rootlocalhost mysql]# find / -name libtinfo.* /usr/lib64/libtinfo.so.6 /usr/lib64/libtinfo.so.6.1[rootlocalhost mysql]# ln -s /usr/lib64/libtinfo.so.6.1 /usr/lib64/libtinfo.so.5 (7)如果想要service控制它的开启和关闭 [rootlocalhost mysql]# ls bin data docs include lib LICENSE man README share support-files [rootlocalhost mysql]# cp -a ./support-files/mysql.server /etc/init.d/mysql #chkconfig --add mysql 这条命令的作用是将 mysql 服务添加到系统的服务管理列表中使得系统能够通过 chkconfig 工具来管理该服务的启动级别。 [rootlocalhost mysql]# chkconfig --add mysql [rootlocalhost mysql]# service mysql restart Shutting down MySQL.. SUCCESS! Starting MySQL. SUCCESS! [rootlocalhost mysql]# service mysql statusSUCCESS! MySQL running (26540) [rootlocalhost mysql]# ln -s /usr/local/mysql/bin/mysql /usr/bin(8)使用临时密码登录验证mysql [rootlocalhost mysql]# mysql -uroot -pis/BIErGB051 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.25Copyright (c) 2000, 2021, Oracle and/or its affiliates.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 (9)修改密码 mysql alter user rootlocalhost identified by 123456 (10)exit退出,使用新密码登录 [rootlocalhost mysql]# mysql -uroot -p123456 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 8.0.25 MySQL Community Server - GPLCopyright (c) 2000, 2021, Oracle and/or its affiliates.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(11)使用systemctl控制mysql • systemd一个更高效的系统服务管理器 – 开机服务并行启动各系统服务间的精确依赖 – 服务目录/usr/lib/systemd/system/ – 主要管理工具systemctl systemd方式 注意: 为了和yum下载的情况一致,设置文件名称为mysqld.service,使用systemctl命令可以省略.service后缀 systemctl start mysqld #启动mysqld systemctl stop mysqld #停止mysqld systemd管理方式思路 用户--systemctl--》systemd--服务启动配置文件--》mysqld启动 •管理员服务文件默认路径 –/usr/lib/systemd/system/ •重新加载服务启动配置文件(每次修改mysqld.service文件都要执行这个命令一次) systemctl daemon-reload 再启动mysqld: systemctl start mysqld [rootlocalhost system]# cd /usr/lib/systemd/system [rootlocalhost system]# vim mysqld.service [Unit] DescriptionMySQL Server Afternetwork.target[Service] TypeforkingPIDFile/usr/local/mysql/data/mysql1.pid ExecStart/usr/local/mysql/support-files/mysql.server start ExecStop/usr/local/mysql/support-files/mysql.server stop[Install] WantedBymulti-user.target[rootlocalhost system]# systemctl daemon-reload[rootlocalhost system]# systemctl stop mysqld [rootlocalhost system]# systemctl status mysqld [rootlocalhost system]# systemctl start mysqld 5.使用shell脚本安装,mysql并启动: 为了更好的效果新建一个Linux虚拟机处理 (1) 设置hostname方便查看pid文件因为pid的文件名称与hostname有关 就设置为mysql1 (2) 准备/etc/my.cnf文件(为了方便使用之前的同名文件也可) [mysqld] log-error/usr/local/mysql/log/mysql.err basedir/usr/local/mysql datadir/usr/local/mysql/data socket/tmp/mysql.sock character-set-serverUTF8MB4(3)shell脚本文件install_mysql.sh #!/bin/bashif [ -d /usr/local/mysql ];thenecho /usr/local/mysql文件夹已经存在,请确认是否安装了mysqlexit fi echo 正在解压压缩包 tar -Jxf mysql-8.0.25-linux-glibc2.12-x86_64.tar.xz mv mysql-8.0.25-linux-glibc2.12-x86_64 /usr/local/mysql#创建一些必要的文件夹 mkdir /usr/local/mysql/{binlog,data,log,tmpdir,conf} -p#检查mysql进程 mysql_pidps -ef | grep mysqld | wc -l if [ $mysql_pid -eq 1 ];thenecho mysql进程没有运行 elseecho 有mysql进程运行,请检查 fi#检查mysql用户 mysql_usercat /etc/passwd | grep -w mysql | wc -l if [ $mysql_user -eq 1 ];thenecho mysql用户已经存在 elseecho mysql用户不存在,开始添加mysql用户useradd mysql -s /sbin/nologinecho 添加mysql用户成功 fi#处理libtinfo.so.5报错 ln -s /usr/lib64/libtinfo.so.6.1 /usr/lib64/libtinfo.so.5#修改目录权限 chown -R mysql.mysql /usr/local/mysql#增加配置文件 if [ -f /etc/my.cnf ];thenecho /etc/my.cnf文件存在 elseecho /etc/my.cnf文件不存在exit fi#初始化 echo 开始初始化 /usr/local/mysql/bin/mysqld \ --defaults-file/etc/my.cnf \ --usermysql \ --initialize #判断初始化是否成功 mysql_initcat /usr/local/mysql/log/mysql.err | grep -i rootlocalhost: | wc -l if [ $mysql_init -eq 1 ];thenecho mysql初始化成功 elseecho mysql初始化失败exit fi#获取临时密码 temp_pwd$(grep temporary password /usr/local/mysql/log/mysql.err) pwd${temp_pwd##* } echo 临时密码是: ${pwd}#配置启动脚本 if [ ! -f /etc/init.d/mysql.server ];thencp /usr/local/mysql/support-files/mysql.server /etc/init.d/ -rfchmod 700 /etc/init.d/mysql.server fi#启动mysql /etc/init.d/mysql.server start#增加家环境变量 mysql_pathgrep export PATH$PATH:/usr/local/mysql/bin /etc/profile | wc -l if [ $mysql_path -eq 0 ];thenecho export PATH\$PATH:/usr/local/mysql/bin /etc/profilesource /etc/profile fi#通过临时密码登录mysql,并修改密码 mysql -uroot -p${pwd} --connect-expired-password -e alter user rootlocalhost identified by 123456 echo mysql8.0.25安装完成!4给脚本添加执行权限 chomod x install_mysql.sh 5执行脚本 ./install_mysql.sh 注意如果要使用service命令处理mysql需要再将/etc/init.d/mysql.server改为/etc/init.d/mysql如下图所示也可以直接到脚本文件相应的位置修改代码
http://www.dnsts.com.cn/news/249210.html

相关文章:

  • 做网站找模板如何安装网站程序
  • 徐州建站网站模板wordpress俄语
  • 磐安网站建设深圳龙岗房
  • 一流的镇江网站建设网站查询功能 技术支持 中企动力
  • 网站快速排名是怎么做的邢台哪里建网站
  • 网站建设工作流程新闻类软文营销案例
  • 济南网站建设推荐q479185700上快半路出家去学计算机网站开发
  • 长尾关键词爱站廊坊北京网站建设
  • 网站是怎么做的吗建设厅网站查询
  • 玉山网站制作软文营销公司
  • 专业外贸网站网络营销代运营服务
  • html5微网站陕西住房和城乡建设厅网站
  • 大连网站建设蛇皮果wordpress html标签可以
  • 网上服装定制网站什么叫网站收录
  • 河南网站推广企业管理培训课程名称
  • 珠海建设局网站首页泉港报名网站建设需要
  • 网站页面多大合适网站建设银行转账
  • 广州高端模板网站学院网站建设作用
  • 南京cms模板建站微信管理平台登录
  • 深圳58同城招聘网最新招聘信息张家界seo排名
  • 推广网站公司网络广告推广策划
  • 个人备案能公司网站网页设计培训 周末双休
  • 我要建一个网站为什么wordpress样式无效
  • 建设网站所需的费用的估算建筑行业教育培训平台
  • 做网站要准备哪些素材维护网站建设空间出租
  • 网站建设方案 流程建立网站的英文
  • 网站seo的关键词排名怎么做的网站关键词太多好不好
  • 用dedecms织梦做中英文网站邯郸注册公司
  • 花都区网站建设网页制作三剑客是指
  • 某企业网站的分析优化与推广优设网字体