mysql: [ERROR] unknown option '--skip-grant-tables'

mysql: [ERROR] unknown option '--skip-grant-tables'

MySQL database reports ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

I saw on the Internet that I need to configure my.ini

I am using win10 system and I am using mysql-5.7.18-winx64mysql

There is no my.ini file in the file. I saw on the Internet that I could create one myself, so I added one at home.

The content is as follows:

[mysql]s

kip-grant-tables


# Set the default character set for the mysql client

default-character-set=utf8

[mysqld]

#Set port 3306

port = 3306

# Set the installation directory of mysql

basedir=C:\Program Files\mysql-5.7.18-winx64

# Set the storage directory for mysql database data

datadir=C:\Program Files\mysql-5.7.18-winx64\data

# Maximum number of connections allowed

max_connections=200

# The default character set used by the server is the 8-bit latin1 character set

character-set-server=utf8

# The default storage engine that will be used when creating new tables

default-storage-engine=INNODB

However, an error is reported: mysql: [ERROR] unknown option '--skip-grant-tables'

My MySQL is 5.0.7. When I start MySQL in the console, I use: mysqld --skip-grant-tables . Note that there are two horizontal lines in the middle

I found on the Internet that I can execute: mysqld -nt -skip-grant-tables

Solution to the problem that the command line mysqld -skip-grant-tables fails to log in in mysql8.0 version

1. Log in to cmd with administrator privileges. If you don’t know how to log in as an administrator, please search for cmd and right-click the search result.

2. Enter the command line: net stop mysql; then prompt. The service is stopping --> The service has stopped. If other errors occur, please search Baidu.

This is just an example. Please check the specific service name in Services. For example, mine is mysql57.

If the service will not open, please win+R --> services.msc --> press Enter and find the service name starting with mysql.

3. Since mysqld --skip-grant-tables is no longer valid in mysql8.0, use mysqld --console --skip-grant-tables --shared-memory

4. Open another cmd and log in directly using mysql without a password.

You can log in here, so I'll write this first.

You may also be interested in:
  • MySQL bypasses granting information_schema objects and reports ERROR 1044 (4200) error
  • How to solve the 10060 unknow error when Navicat remotely connects to MySQL
  • Ubuntu 18.0.4 installs mysql and solves ERROR 1698 (28000): Access denied for user ''''root''''@''''localhost'''
  • ERROR 2002 (HY000): Can't connect to local MySQL server through socket ''/tmp/mysql.sock''
  • Solution to MySQL server login error ERROR 1820 (HY000)
  • Solve MySQL startup error: ERROR 2003 (HY000): Can't connect to MySQL server on ''localhost'' (10061)

<<:  Python Flask WeChat applet login process and login api implementation code

>>:  Vue uses Amap to realize city positioning

Recommend

A detailed introduction to the Linux directory structure

When you first start learning Linux, you first ne...

Interpretation and usage of various React state managers

First of all, we need to know what a state manage...

Vue project code splitting solution

Table of contents background Purpose Before split...

Share some tips on using JavaScript operators

Table of contents 1. Optional chaining operator [...

Table paging function implemented by Vue2.0+ElementUI+PageHelper

Preface I have been working on some front-end pro...

How to change the terminal to a beautiful command line prompt in Ubuntu 18

I reinstalled VMware and Ubuntu, but the command ...

JS version of the picture magnifying glass effect

This article shares the specific code of JS to ac...

W3C Tutorial (6): W3C CSS Activities

A style sheet describes how a document should be ...

Why should you be careful with Nginx's add_header directive?

Preface As we all know, the nginx configuration f...

img usemap attribute China map link

HTML img tag: defines an image to be introduced in...

Detailed analysis of the parameter file my.cnf of MySQL in Ubuntu

Preface Based on my understanding of MySQL, I thi...

An example of installing MySQL on Linux and configuring external network access

Configuration steps 1. Check whether DNS is confi...

Detailed explanation of JavaScript clipboard usage

(1) Introduction: clipboard.js is a lightweight J...