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

网站建设服务器主板1150针公司网站开发策略和基本步骤

网站建设服务器主板1150针,公司网站开发策略和基本步骤,办公宽带多少钱一年,网站建设用到的算法MySQL是一个关系型数据库管理系统。 一、安装启动 安装mysql相关软件包 yum install mysql-server 启动mysql服务 systemctl start mysqld systemctl status mysqld mysql数据库启动失败问题汇总&#xff1a; <问题1>、start mysqld显示失败&#xff0c;如下所示&…

MySQL是一个关系型数据库管理系统。

一、安装启动

安装mysql相关软件包
yum install mysql-server

启动mysql服务
systemctl start mysqld
systemctl status mysqld


mysql数据库启动失败问题汇总:

<问题1>、start mysqld显示失败,如下所示:

[root@bogon ~]# systemctl status mysqld.service
● mysqld.service - MySQL 8.0 database serverLoaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)Active: failed (Result: exit-code) since Tue 2023-02-28 15:44:06 CST; 5s agoProcess: 3705 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS)Process: 3690 ExecStart=/usr/libexec/mysqld --basedir=/usr (code=exited, status=1/FAILURE)Process: 3653 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, status=0/SUCCESS)Process: 3628 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)Main PID: 3690 (code=exited, status=1/FAILURE)Status: "Data Dictionary upgrade from MySQL 5.7 in progress"228 15:44:06 bogon systemd[1]: Starting MySQL 8.0 database server...
228 15:44:06 bogon systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
228 15:44:06 bogon systemd[1]: mysqld.service: Failed with result 'exit-code'.
228 15:44:06 bogon systemd[1]: Failed to start MySQL 8.0 database server.

查看日志/var/log/mysql/mysql.log

2023-02-28T07:13:19.872234Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2023-02-28T07:13:20.296742Z 1 [ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine.
2023-02-28T07:13:20.297433Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2023-02-28T07:13:20.297932Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-02-28T07:13:20.298852Z 0 [System] [MY-010910] [Server] /usr/libexec/mysqld: Shutdown complete (mysqld 8.0.21)  Source distribution.
2023-02-28T07:14:00.654090Z 0 [Warning] [MY-011037] [Server] The CYCLE timer is not available. WAIT events in the performance_schema will not be timed.
2023-02-28T07:14:00.753692Z 0 [System] [MY-010116] [Server] /usr/libexec/mysqld (mysqld 8.0.21) starting as process 133099
2023-02-28T07:14:00.778363Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2023-02-28T07:14:00.778536Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-02-28T07:14:00.880888Z 1 [ERROR] [MY-012530] [InnoDB] Unknown redo log format (103). Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/ upgrading-downgrading.html.

解决方法:
1、删除mysql数据库文件夹
rm -rf /var/lib/mysql
2、mysql数据库初始化
mysqld --initialize --console
3、修改/var/run/mysqld/权限
chown -R mysql:mysql /var/lib/mysql/
4、启动mysql服务
systemctl start mysqld
5、查看mysql数据库状态
systemctl status mysqld

<问题2>、Access denied for user ‘root’@‘localhost’ (using password: NO)错误

[root@bogon ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)

【问题分析】:
出现Access denied的原因可能如下:
1、mysql的服务停止
2、用户的端口号或者ip导致
3、mysql的配置文件错误----/etc/my.cnf文件
4、root用户密码错误
【解决方法】:
1、修改/etc/my.cnf文件
在[mysqld]下添加一行,使其登录时跳过权限检查
skip-grant-tables
2、重启mysql服务器
systemctl stop mysqld
systemctl start mysqld
3、登录
[root@bogon bin]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 8.0.21 Source distribution

Copyright © 2000, 2020, Oracle and/or its affiliates. All rights reserved.

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>


二、测试

初始化数据库
mysql_secure_installation -D
会有如下一些提示,为root用户设置初始密码,譬如: PassW0rd!

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: y

There are three levels of password validation policy:

LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2
Please set the password for root here.

#设置 root 用户的初始密码, 譬如 PassW0rd!
New password:

验证数据库最基本的增删改查功能。

从命令行登录到数据库

mysql -pPassW0rd!
展示数据库

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 10
Server version: 8.0.21 Source distribution

Copyright © 2000, 2020, Oracle and/or its affiliates. All rights reserved.

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> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
±-------------------+
4 rows in set (0.00 sec)

mysql>
创建测试db

mysql> create database test;
Query OK, 1 row affected (0.00 sec)

mysql> use test;
Database changed
mysql>
创建表

mysql> create table hola(bonj text);
Query OK, 0 rows affected (0.01 sec)

mysql>
插入数据

mysql> insert into test.hola(bonj) values(“Mundo”);
Query OK, 1 row affected (0.01 sec)

mysql> insert into test.hola(bonj) values(“Lundo”);
Query OK, 1 row affected (0.01 sec)

mysql> insert into test.hola(bonj) values(“测试”);
Query OK, 1 row affected (0.00 sec)
更新数据

mysql> select * from test.hola;
±-------+
| bonj |
±-------+
| Mundo |
| Lundo |
| 测试 |
±-------+
3 rows in set (0.00 sec)

mysql> update test.hola set bonj=‘Xundo’ where bonj=‘Mundo’;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select * from test.hola;
±-------+
| bonj |
±-------+
| Xundo |
| Lundo |
| 测试 |
±-------+
3 rows in set (0.00 sec)

mysql>
查询数据

mysql> select * from test.hola;
±-------+
| bonj |
±-------+
| Xundo |
| Lundo |
| 测试 |
±-------+
3 rows in set (0.00 sec)

mysql>
删除数据

mysql> delete from test.hola where bonj=‘Xundo’;
Query OK, 1 row affected (0.00 sec)

mysql> select * from test.hola;
±-------+
| bonj |
±-------+
| Lundo |
| 测试 |
±-------+
2 rows in set (0.00 sec)

mysql>
退出 sql

SQL> exit

http://www.sczhlp.com/news/147250/

相关文章:

  • asp提交到另外网站手机网站建设深圳
  • 做一个电子商务网站app 官方网站 案例
  • 网站制作优势百度收录申请
  • 做公司网站客户群体怎么找成都企业网站设计服务商
  • 企业门户网站怎么做网站建设方案模板
  • 海珠做网站cad培训班一般学费多少钱
  • 西安建网站价格低做网站需要学些什么条件
  • 免费开源的百度文库平替!支持多格式文档预览与存储!
  • 个人行业选择
  • idea
  • 写假数据
  • 响应式网站开发有哪些框架西宁网站建设模板
  • 徐州建站公司模板龙岗网站设计代理商
  • 网站不显示内容外贸英语网站
  • 邢台建网站哪里有怎么做能收费的视频网站
  • 深圳制作网站服务简洁的公司网站
  • 安徽网站建设信息护肤品网站建设需求分析
  • 西安米德建站企业网站建设经验分享
  • 小型旅游网站建设方案青岛展厅设计公司
  • 网站建设技术外包网站设计网站建设公司
  • C语言的指针与cpp的引用
  • day24——Java高级技术深度解析:单元测试、反射、注解与动态代理 - 指南
  • 湖北大网站建设友链交换平台
  • rp做网站百度贴吧网站开发需求分析
  • 网站弹出式链接后台怎么做安徽网站开发培训
  • 物流管理网站建设wordpress 作者 英文
  • 【征文计划】基于Rokid眼镜平台的AR历史情景课堂创意应用 - 指南
  • 忍了一年,我的SAAS CRM终于到期了!
  • 手机网站建设商场机关网站建设 方案
  • jsp网站开发案例小米新品发布会