网站模板内容怎么添加图片不显示,wordpress主题 qux,试玩平台wordpress,牛牛网站开发银河麒麟v10 rpm安装包 安装mysql 8.35 1、卸载mariadb2、下载Mysql安装包3、安装Mysql 8.353.1、安装Mysql 8.353.3、安装后配置 1、卸载mariadb
由于银河麒麟v10系统默认安装了mariadb 会与Mysql相冲突#xff0c;因此首先需要卸载系统自带的mariadb 查看系统上默认安装的M… 银河麒麟v10 rpm安装包 安装mysql 8.35 1、卸载mariadb2、下载Mysql安装包3、安装Mysql 8.353.1、安装Mysql 8.353.3、安装后配置 1、卸载mariadb
由于银河麒麟v10系统默认安装了mariadb 会与Mysql相冲突因此首先需要卸载系统自带的mariadb 查看系统上默认安装的Mariadb软件包 使用yum查看已经安装的mariadb软件包
yum list --installed mariadbrpm -qa|grep mariadb查看默认的mariadb配置文件
在这里插入代码片默认的配置文件是 /etc/my.cnf 查看默认的mariadb配置目录
find / -type d -name my.cnf*使用yum卸载 mariadb
yum remove mariadb.x86_64验证卸载Mariadb成功 查看Mariadb配置文件和目录是否还存在 已经不存在了 至此mariadb卸载完成
2、下载Mysql安装包
访问官网下载链接 链接: https://dev.mysql.com/downloads/mysql/
选择如下 点击下载按钮 下载安装包 选择 mysql-8.0.35-1.el8.x86_64.rpm-bundle.tar 点击下载 为什么选择redhat 8的操作系统版本呢 https://www.kylinos.cn/about/news/814.html 通过查询麒麟官网得知银河麒麟高级服务器操作系统是兼容centos8的centos8和redhat8兼容。 3、安装Mysql 8.35
官方安装文档 链接: https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/linux-installation-rpm.html
RPM Packages for MySQL Community Edition
Package NameSummarymysql-community-clientMySQL client applications and toolsmysql-community-client-pluginsShared plugins for MySQL client applicationsmysql-community-commonCommon files for server and client librariesmysql-community-develDevelopment header files and libraries for MySQL database client applicationsmysql-community-embedded-compatMySQL server as an embedded library with compatibility for applications using version 18 of the librarymysql-community-icu-data-filesMySQL packaging of ICU data files needed by MySQL regular expressionsmysql-community-libsShared libraries for MySQL database client applicationsmysql-community-libs-compatShared compatibility libraries for previous MySQL installations; only present if previous MySQL versions are supported by the platformmysql-community-serverDatabase server and related toolsmysql-community-server-debugDebug server and plugin binariesmysql-community-testTest suite for the MySQL servermysql-communityThe source code RPM looks similar to mysql-community-8.0.35-1.el7.src.rpm, depending on selected OSAdditional debuginfo RPMsThere are several debuginfo packages: mysql-community-client-debuginfo, mysql-community-libs-debuginfo mysql-community-server-debug-debuginfo mysql-community-server-debuginfo, and mysql-community-test-debuginfo.
rpm包的名称格式packagename-version-distribution-arch.rpm
3.1、安装Mysql 8.35
安装命令如下
tar -xvf mysql-8.0.35-1.el8.x86_64.rpm-bundle.tarcd mysql-8.0.35-1.el8.x86_64.rpm-bundlesudo yum install mysql-community-{client,client-plugins,common,libs}-*安装完成后查看mysql的root账户默认密码
grep temporary password /var/log/mysqld.log安装完成后 后形成以下目录和文件
Files or ResourcesLocationFiles or ResourcesLocationClient programs and scripts/usr/binmysqld server/usr/sbinConfiguration file/etc/my.cnfData directory/var/lib/mysqlError log fileFor RHEL, Oracle Linux, CentOS or Fedora platforms: /var/log/mysqld.logValue of secure_file_priv/var/lib/mysql-filesSystem V init scriptFor RHEL, Oracle Linux, CentOS or Fedora platforms: /etc/init.d/mysqldSystemd serviceFor RHEL, Oracle Linux, CentOS or Fedora platforms: mysqldPid file/var/run/mysql/mysqld.pidSocket/var/lib/mysql/mysql.sockKeyring directory/var/lib/mysql-keyringUnix manual pages/usr/share/manInclude (header) files/usr/include/mysqlLibraries/usr/lib/mysqlMiscellaneous support files (for example, error messages, and character set files)/usr/share/mysql
安装完后 会产生一个名为mysql 的系统用户,和一个名为mysql 的系统用户组。
切换到mysql用户命令
su - mysql --shell/bin/bash安装后默认不会启动Mysql服务启动mysql命令
systemctl start mysqld此启动mysql命令做下面这些事情
初始化mysql服务产生ssl证书和密钥在Mysql数据目录下validate_password默认安装。validate_password实现的默认密码策略要求密码至少包含一个大写字母、一个小写字母、一位数字和一个特殊字符并且密码总长度至少为8个字符。已创建超级用户帐户“root”“localhost”。超级用户的密码已设置并存储在错误日志文件中。查看mysql的root账户默认密码 grep temporary password /var/log/mysqld.log
如果在安装过程中出现问题您可能会在错误日志文件/var/log/mysqld.log中找到日志信息。
下面这项是可选的 看调试信息才需要这样启动Mysql一般不需要。
Debug Package. A special variant of MySQL Server compiled with the debug package has been included in the server RPM packages. It performs debugging and memory allocation checks and produces a trace file when the server is running. To use that debug version, start MySQL with /usr/sbin/mysqld-debug, instead of starting it as a service or with /usr/sbin/mysqld. See The DBUG Package for the debug options you can use.3.3、安装后配置
链接: https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/postinstallation.html
使用安装Mysql数据库 时生成的默认密码登录mysql数据库
mysql -uroot -p没修改默认密码前不能进行数据库sql操作
修改Mysql默认密码为Mysql123
mysql ALTER USER rootlocalhost IDENTIFIED BY Root123 PASSWORD EXPIRE NEVER;
ERROR 1396 (HY000): Operation ALTER USER failed for rootlocalhost
mysql
mysql flush privileges;
Query OK, 0 rows affected (0.00 sec)mysql
mysql use mysql
Database changed
mysql
mysql update user set host % where user root;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0mysql
mysql flush privileges;
Query OK, 0 rows affected (0.00 sec)mysql
mysql ALTER USER root% IDENTIFIED WITH mysql_native_password BY Root123;
Query OK, 0 rows affected (0.01 sec)mysql
mysql flush privileges;
Query OK, 0 rows affected (0.01 sec)mysql 使用新密码登录mysql数据库