mysql數據庫安裝及使用常見錯誤

一、Found option without preceding group in config filemysql

D:\mysql-8.0.17\bin>mysqld --initialize --console mysqld: [ERROR] Found option without preceding group in config file D:\mysql-8.0.17\my.ini at line 1. mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

緣由:my.ini文件格式是utf-8sql

解決辦法:my.ini文件保存爲ANSI格式文件加密

 

二、Install/Remove of the Service Denied!spa

解決辦法:打開cmd.exe程序的時候選擇「用管理員身份打開」。code

 

三、MySQL8.0,Navicat鏈接不上,報錯1251blog

緣由是MySQL8.0版本的加密方式和MySQL5.0的不同,鏈接會報錯。utf-8

解決方法input

 

C:\Windows\system32>mysql -uroot -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 18 Server version: 8.0.11 MySQL Community Server - GPL Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>

 

 

mysql> use mysql; Database changed mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; Query OK, 0 rows affected (0.10 sec) mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; Query OK, 0 rows affected (0.35 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.28 sec)
相關文章
相關標籤/搜索