MySQL5.7报错

mysql 配置文件目录:/etc/my.cnf

root 密码为空的时候配置文件中下面这句:

skip-grant-tables

GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY ‘123‘ WITH GRANT OPTION;

执行这句时候错误:

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

这个时候我们只需要

flush privileges
一下,在添加用户就OK了,

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> GRANT ALL PRIVILEGES ON . TO IDENTIFIED BY ‘123‘ WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

这个时候我们成功搞定了,再登录就可以了。

如果报错如下信息:

Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia. Please verify its path and try again
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

我们只要到/etc/yum.repo.s下面把packetxxxx.repo和redhat.repo两个文件删除掉,再启动就可以了,

原文地址:https://blog.51cto.com/lovejxs/2431340

时间: 2024-10-18 21:23:41

MySQL5.7报错的相关文章

MySQL5.7 报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement

MySQL5.7 报错 : ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement 需要重新设置密码.那我们就重新设置一下密码,命令如下: set password = password('123456'); 原文地址:https://www.cnblogs.com/Dev0ps/p/11738557.html

TP3.2项目 MySQL5.7报错1055 group by新特性

TP3.2项目中本来使用的是mysql5.6进行开发,切换到5.7之后,突然发现原来的一些sql运行都报错,错误编码1055,错误信息和sql_mode中的"only_full_group_by"有关,到网上看了原因,说是mysql5.7中only_full_group_by这个模式是默认开启的 ,网上给了很多解决办法,因为我用的是WAMP集成环境,我的解决办法如下: 点击MySQL选择MySQL settings ->选择sql-mode->选择sql-none和sql-

mysql5.7报错 1546、1577和1682问题分析

环境说明:MySQL5.6.40 上xtrabackup全备备份的数据导入到mysql5.7.24实例上,启动MySQL5.7的服务,登录数据库MySQL5.7实例.但是在drop user [email protected]'127.0.0.1'时,报错如下: 2019-08-15T19:02:31.160910+08:00 1546 [ERROR] /usr/local/mysql5.7/bin/mysqld: Column count of mysql.user is wrong. Exp

安装mysql5.6报错问题统计点

报错1(su进入mysql属组时报错): [[email protected] ~]# su - mysql Last login: Thu Aug 31 17:20:03 CST 2017 on pts/1 su: warning: cannot change directory to /home/mysql: No such file or directory -bash-4.2$ exit 解决方法: [[email protected] ~]# cd /home [[email prot

MySQL5.7报错[ERROR] Unix socket lock file is empty /tmp/mysql.sock.lock的解决方法

发现MySQL服务器因系统磁盘写满导致服务停了,清理磁盘后启动服务时无法正常启动,查看localhost.err日志发现如下报错: [ERROR] Unix socket lock file is empty /tmp/mysql.sock.lock 解决: 查看该文件发现确实是空文件,删除该文件后再启动服务已经可以正常启动.参考链接 https://blog.csdn.net/qq_36183569/article/details/83022519 总结: mysql.sock.lock是可读

sql_mode=ONLY_FULL_GROUP_BY 导致lepus监控mysql5.7报错

lepus监控mysql5.7出现的问题: 2017-09-12 12:18:53 [INFO] check mysql controller finished. [WARNING] check mysql 192.168.10.9:3306 failure: 1055 Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'information_schema.proce

安装mysql-5.7.17cmke报错

-- Looking for SHM_HUGETLB - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void * -- Check size of 

源码安装mysql5.6x启动报错:[ERROR] Can't find messagefile '/data/mysqldata/3306/english/errmsg.sys'

170502 10:43:40 mysqld_safe Starting mysqld daemon with databases from /data/mysqldata/3306/data 2017-05-02 10:43:40 0 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead.

mysql5.5 免编译安装及脚本启动报错深入

Mysql安装环境简介: 最近在做MHA.已经安装完毕heartbeat和drbd,现在准备安装Mysql. Mysql安装目录:/opt/mysql Mysql数据目录:/data/mysql 备注:/data目录实际是drbd需要同步到备节点的磁盘分区 [[email protected] src]# df -h Filesystem     Size  Used Avail Use% Mounted on /dev/sda2      9.5G  2.0G  7.1G 22% / tmpf