centos7_mysql8安装记录与数据库转储


Linux基于yum安装mysql8

配置文件在 /etc/my.cnf

日志 /var/log/mysqld.log

报错:
在执行 systemctl start mysqld 时

Job for mysqld.service failed because the control process exited with error code. See "systemctland "journalctl -xe" for details.

解决:

把my.cnf里的datadir目录清空
//可能遗留冲突吧

my.cnf如下:

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

日志分割上是报错的,下是成功的(初始密码)如下:

mysqld: Table 'mysql.plugin' doesn't exist
2020-03-30T01:46:05.790862Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2020-03-30T01:46:05.862425Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-03-30T01:46:05.953447Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-03-30T01:46:05.960271Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-03-30T01:46:05.966924Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2020-03-30T01:46:05.967339Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2020-03-30T01:46:05.967525Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2020-03-30T01:46:05.968385Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-03-30T01:46:05.968637Z 0 [ERROR] [MY-010952] [Server] The privilege system failed to initialize correctly. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2020-03-30T01:46:05.969016Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-03-30T01:46:07.281309Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19)  MySQL Community Server - GPL.
---------------------------------------------------------------------------------------------------- 密码在下第二行
2020-03-30T01:55:15.932199Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19) initializing of server in progress as process 4142
2020-03-30T01:55:20.967699Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: iHU)9EPSmrRP
2020-03-30T01:55:24.734817Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 4213
2020-03-30T01:55:25.994464Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-03-30T01:55:26.074069Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
2020-03-30T01:55:26.219911Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
**************setup finished*****************________________Nice

安装成功之后 修改密码

 mysql -u root -p
 
 password: log里有
 
 alter user user() identified by '!zZ6'   //mysql8 密码规则字母、数字、符号都要有
 

window 迁移

链接

window端
Navicat 右键数据库转储sql文件

linux

mysql -u root -p

create database XXX
use XXX
source /转储sql文件
show tables

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用\[1\]和\[2\]提到了SQL0551N错误,表示用户"testVIEW"没有在对象"SYSCAT.PACKAGES"和"SYSCAT.COLUMNS"上执行"SELECT"操作所需的授权或权限。而引用\[3\]则提到了用户"TEST1"没有在对象"GMILNE.ORG"上执行"SELECT"操作所需的权限。 对于问题中的SQL0551N错误,它表示用户"SJUSER"没有在对象"SYSIBM.SYSTABLES"上执行"SELECT"操作所需的权限。这意味着用户"SJUSER"没有足够的权限来查询"SYSIBM.SYSTABLES"表。为了解决这个问题,需要给用户"SJUSER"授予执行"SELECT"操作的权限。这可以通过授权或者提升用户的权限来实现。具体的授权或权限提升的步骤可能因数据库管理系统的不同而有所不同,建议参考相关数据库管理系统的文档或咨询数据库管理员来获取具体的操作指导。 #### 引用[.reference_title] - *1* *2* [DB2最小化权限问题](https://blog.csdn.net/hbhe0316/article/details/122701218)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [DB2 GRANT 授权问题](https://blog.csdn.net/baidu_34051990/article/details/53005245)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值