Home  >  Article  >  Database  >  What should I do if a 1044 error occurs in mysql?

What should I do if a 1044 error occurs in mysql?

coldplay.xixi
coldplay.xixiOriginal
2020-11-03 09:25:2112098browse

The solution to the 1044 error in mysql: first enter the bin directory of mysql in cmd mode, enter the relevant code and press Enter; then open a dos window, also switch to the mysql bin directory, enter the relevant code; finally Just set a password.

What should I do if a 1044 error occurs in mysql?

Solution to 1044 error in mysql:

This error is usually the file my-default.ini or There may be a problem with the configuration of sql_mode in this file my.ini (corresponding to your own version). You can delete it and then follow the steps below

1. Enter the bin directory of mysql in cmd mode and enter 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,Enter

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)

See this The result shows that MySQL has risen.

2. Open another dos window, also switch to the mysql bin directory, enter D:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -u root mysql, and return Che

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>

has been connected to the mysql database and you can enter the mysql command.

3. Set the password

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

and then connect to mysql in the normal way. If you cannot connect, check whether the mysql service is started.

Related free learning recommendations: mysql video tutorial

The above is the detailed content of What should I do if a 1044 error occurs in mysql?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn