温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

mysql出现1044错误的解决方法

发布时间:2020-11-04 10:21:48 来源:亿速云 阅读:887 作者:小新 栏目:MySQL数据库

这篇文章主要介绍了mysql出现1044错误的解决方法,具有一定借鉴价值,需要的朋友可以参考下。希望大家阅读完这篇文章后大有收获。下面让小编带着大家一起了解一下。

mysql出现1044错误的解决办法:首先cmd模式进入mysql的bin目录,并输入相关代码回车;然后再打开一个dos窗口,同样切到mysql bin目录下,输入相关代码;最后设置密码即可。

mysql出现1044错误的解决办法:

这个错误一般是这个文件my-default.ini或者这个文件my.ini(对应你自己的版本)中sql_mode的配置可能有问题,你可以把它删除掉,然后按照下面的步骤做

1、cmd模式进入mysql的bin目录,输入D:\Program Files\MySQL\MySQL Server 5.6\bin>mysqld --defaults-file="D:\Program Files\MySQL\MySQL Server 5.6\my-default.ini" --console --skip-grant-tables,回车

2014-08-29 10:40:48 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use

2014-08-29 10:40:48 8108 [Note] Plugin 'FEDERATED' is disabled.

2014-08-29 10:40:48 8108 [Note] InnoDB: Using atomics to ref count buffer pool pages

2014-08-29 10:40:48 8108 [Note] InnoDB: The InnoDB memory heap is disabled

2014-08-29 10:40:48 8108 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions

2014-08-29 10:40:48 8108 [Note] InnoDB: Memory barrier is not used

2014-08-29 10:40:48 8108 [Note] InnoDB: Compressed tables use zlib 1.2.3

2014-08-29 10:40:48 8108 [Note] InnoDB: Not using CPU crc32 instructions

2014-08-29 10:40:48 8108 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2014-08-29 10:40:48 8108 [Note] InnoDB: Completed initialization of buffer pool

2014-08-29 10:40:48 8108 [Note] InnoDB: Highest supported file format is Barracuda.

2014-08-29 10:40:57 8108 [Note] InnoDB: 128 rollback segment(s) are active.

2014-08-29 10:40:57 8108 [Note] InnoDB: Waiting for purge to start

2014-08-29 10:40:57 8108 [Note] InnoDB: 5.6.20 started; log sequence number 1625997

2014-08-29 10:40:57 8108 [Note] Server hostname (bind-address): '*'; port: 3306

2014-08-29 10:40:57 8108 [Note] IPv6 is available.

2014-08-29 10:40:57 8108 [Note]   - '::' resolves to '::';

2014-08-29 10:40:57 8108 [Note] Server socket created on IP: '::'.

2014-08-29 10:40:58 8108 [Note] mysqld: ready for connections.

Version: '5.6.20'  socket: ''  port: 3306  MySQL Community Server (GPL)

看到这个结果就说明MySQL已经起来了。

2、再开一个dos窗口,同样切到mysql bin目录下,输入D:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -u root mysql,回车

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.20 MySQL Community Server (GPL)
mysql>

已连接上mysql数据库,可以输入mysql命令了。

3、设置密码

mysql> update user set password=PASSWORD('password') where user='root';
Query OK, 2 rows affected (0.02 sec)
Rows matched: 3  Changed: 2  Warnings: 0
mysql> FLUSH PRIVILEGES; 
mysql> quit

之后按正常方法连接mysql就可以了。如果不能连接,查看下mysql服务是否启动。

感谢你能够认真阅读完这篇文章,希望小编分享mysql出现1044错误的解决方法内容对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,遇到问题就找亿速云,详细的解决方法等着你来学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI