Linux上安装MySQL以及Navicat连接双系统Course——just look it!

4 篇文章 0 订阅
1 篇文章 0 订阅

我是灼灼,一只初学Java的大一金渐层。
向往余秀华和狄兰·托马斯的疯狂,时常沉溺于将情感以诗相寄;追逐过王尔德、王小波的文字,后陷于毛姆和斯蒂芬·金不可自拔;热爱文学的浪潮,白日梦到底却总在现实里清醒;艳羡平静又极度渴盼奔跑的力量。
欢迎与我交流鸭· QQ:1517526827;
个人博客:https://blog.csdn.net/weixin_52777510?spm=1001.2101.3001.5343

Linux上安装MySQL以及navicat连接双系统

Linux安装MySQL教程转载:

1)yum命令安装(非常方便的方式)大佬教程在这里

安装过程没有截图,因为之前安装不成功重装了虚拟机,所以过程异常顺利!

大家如果有报错的话直接百度,都可以搜到正解;如果仍然无法解决,很大可能是因为之前的MySQL安装残留的问题(来自Linux&MySQL小白血的教训,如果是,当断则断,立刻重装虚拟机吧~)!

2)如果有想看另一种tar压缩包安装方式的小伙伴,这里有我之前尝试的几个安装教程以及安装过程中报错的一些解决办法,可以参考,当然了千万不要信以为真!(我安装没有成功,二进制包没有内置配置文件,纯手打的,且最终报错无数,一直无法改正,要哭了,所以换了第一种办法~如果有相似经历的小朋友,一定要记住我说的,立刻重装虚拟机吧,无法挽救了!!!)

下面是之前错误安装的一点点笔记:

参考教程们:来啦!

(高能预警!!!真的是一个蠢货小白的报错记录史)

Linux安装MySQL第二种方式笔记:

首先发现桥接模式连不上网,换成了nat模式;

成功联网并显示ip地址(命令ifconfig)!

start load!

卸载Maria

1.查询已经默认安装的Maria DB

[root@centosxxxxx xxxxx]# rpm -qa|grep maria*

查询命令

#rpm -qa //#号代表root权限

显示出多个已经安装好的文件名

marisa-0.2.4-4.el7.x86_64
mariadb-server-5.5.65-1.el7.x86_64
mariadb-5.5.65-1.el7.x86_64
mariadb-libs-5.5.65-1.el7.x86_64

2.依次删除以卸Maria DB

[root@centosxxxxx xxxxx]# rpm -e --nodeps mariadb-server-5.5.65-1.el7.x86_64
[root@centosxxxxx xxxxx]# rpm -e --nodeps mariadb-5.5.65-1.el7.x86_64
[root@centosxxxxx xxxxx]# rpm -e --nodeps mariadb-libs-5.5.65-1.el7.x86_64

删除命令

#rpm -e --nodeps 文件名

3.重新执行第一步查询命令确认是否完全卸载

[root@centosxxxxx xxxxx]# rpm -qa|grep maria*

仅显示出一个文件,表示卸载完成

marisa-0.2.4-4.el7.x86_64

4.删除etc目录下的my.cnf

[root@centosxxxxx xxxxx]# rm /etc/my.cnf

删除文件命令

#rm /目录名/文件名

显示没有这个文件,那应该不用删除了

rm: cannot remove ‘/etc/my.cnf’: No such file or directory

创建MySQL用户和组

1.创建MySQL用户组

[root@centosxxxxx xxxxx]# groupadd mysql

不清楚是怎么回事,Home里面空空的…

groupadd: group ‘mysql’ already exists

2.添加MySQL用户,添加到MySQL用户组

[root@centosxxxxx xxxxx]# useradd -g mysql mysql

基于此…

useradd: user ‘mysql’ already exists

唉,我决定重新建个用户,叫mygzz…(后面放弃掉了,分不清组和用户)

[root@centosxxxxx xxxxx]# useradd -g mygzz mysql

这里要注意,前面是用户组,后面是用户,我写错了…

useradd: group ‘mygzz’ does not exist

这样应该就行了~

[root@centosxxxxx xxxxx]# useradd -g mysql mygzz

//MySQL安装前准备(错误积累,看第二次安装吧)

1.将下载好的安装包移动到/user/local/目录下

这里应该得把压缩文件传输过来,我先试一下~

xftp传输成功!目标是/home/xxxxx/download(PS:这个xxxxxx在虚拟机显示不出来~)

然后剪切复制到了/home/user/local目录下

2.尝试解压命令

[root@centosxxxxx xxxxx]#tar -zxvf mysql-8.0.23-linux-glibc2.12-x86_64.tar.xz

报错:

tar (child): mysql-8.0.23-linux-glibc2.12-x86_64.tar.xz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

可能是因为没有安装组件的缘故,所以

3.安装组件xz命令

[root@centosxxxxx xxxxx]# yum install -y xz

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirror.lzu.edu.cn
  • extras: mirror.lzu.edu.cn
  • updates: mirror.lzu.edu.cn
    base | 3.6 kB 00:00:00
    extras | 2.9 kB 00:00:00
    updates | 2.9 kB 00:00:00
    updates/7/x86_64/primary_db | 4.7 MB 00:00:06
    Package xz-5.2.2-1.el7.x86_64 already installed and latest version
    Nothing to do(这里组件没有安装上,不知道为啥,wget包是存在的)

4.安装组件后仍然报错如上

第二次安装~

MySQL安装前准备

1.将下载好的安装包移动到/user/local/目录下

移动命令:

[root@centosxxxxx Downloads]# mv mysql-8.0.23-linux-glibc2.12-x86_64.tar.xz /usr/local/

下面这些命令的原因是,一定要弄清楚自己的虚拟机上面的目录,然后正确的按照绝对路径转入~

[root@centosxxxxx]# ls
Desktop Documents Downloads Music Pictures Public Templates user Videos
[root@centosxxxxx]# cd Downloads

注意:

cd / 目录名 是打开某一个目录

cd 目录名 是打开子目录

2.解压安装包

应该先转到该压缩包的目录下面~

[root@centosxxxxx Downloads]# cd /usr/local
[root@centosxxxxx local]# tar -zxvf mysql-8.0.23-linux-glibc2.12-x86_64.tar.xz

解压命令:

[root@centosxxxxx local]# tar -zxvf mysql-8.0.23-linux-glibc2.12-x86_64.tar.xz

新的报错:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

解决,新的解压命令~

[root@centosxxxxx local]# tar -xvf mysql-8.0.23-linux-glibc2.12-x86_64.tar.xz

安装了一堆东西,成功!

解压命令变了,为什么要这样变?

第一种:

tar包压缩的时候用cvf参数,解压的时候用xvf参数
或压缩的时候用czvf参数,解压的时候用xzvf参数

具体解释可以参照博客,重点如下:

tar -xvf file.tar //解压 tar包

tar -xzvf file.tar.gz //解压tar.gz

这样就明白了,因为解压的是xz包!

3.将解压后的文件夹重命名为mysql

[root@centosxxxxx local]# mv mysql-8.0.23-linux-glibc2.12-x86_64 mysql

应该是成功了~

配置my.cnf文件

1.将/usr/local/mysql/support-files路径下的my-default.cnf文件拷贝到/etc/my.cnf命名为my.cnf

[root@centosxxxxx support-files]# cp my-default.cnf /etc/my.cnf
cp: cannot stat ‘my-default.cnf’: No such file or directory
[root@centosxxxxx support-files]# ls
mysqld_multi.server mysql-log-rotate mysql.server
[root@centosxxxxx support-files]# ll
total 20
-rwxr-xr-x. 1 7161 31415 1061 Dec 11 15:42 mysqld_multi.server
-rw-r–r--. 1 7161 31415 2048 Dec 11 18:22 mysql-log-rotate
-rwxr-xr-x. 1 7161 31415 10576 Dec 11 18:22 mysql.server

。。。。。。。。。没有默认配置文件。。。。。。。。。。。。。

自己手动写一个!命令:

[root@centosxxxxx support-files]# vim /etc/my.cnf

my.cnf内容如下:

[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
socket=/var/lib/mysql/mysql.sock
[mysqld]
skip-name-resolve
#设置3306端口
port = 3306
socket=/var/lib/mysql/mysql.sock
# 设置mysql的安装目录
basedir=/usr/local/mysql
# 设置mysql数据库的数据的存放目录
datadir=/usr/local/mysql/data
# 允许最大连接数
max_connections=1000
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
lower_case_table_name=1
max_allowed_packet=16M

输入完毕,带#号的不输;

发生了一点意外,我还编辑了这个=_=

在mysql目录下面新建一个my.cnf文件

vi /home/mysql/port-3306/my.cnf

安装MySQL

1.进入到mysql文件目录下,执行命令

#cd /usr

#cd local

#cd mysql

修改当前目录拥有者为mysql用户,想写mygzz来着,不可行

*chown -R mysql:mysql ./ *

安装数据库

[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/

这个是旧版本的查询命令,新版本是这个,输入了很多次,很多很多很多次,但是,报错老是那样…

mysql目录下面:

./bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/mysql --initialize

网上找到的解决方法:

yum -y install libaio

yum -y install autoconf

yum -y install perl perl-devel

这个可能有的安装上了,有的缺wget包?但是我是安装了wget包的。。。。

后来又查到了安装common的办法:

命令:

rpm -ivh mysql-community-common-8.0.17-1.el7.x86_64.rpm --nodeps --force

改过版本但是不能安装,检查安装的MySQL的rpm也并不存在这些依赖…

还有的依赖包括:

rpm -ivh mysql-community-libs-8.0.17-1.el7.x86_64.rpm --nodeps --force

rpm -ivh mysql-community-client-8.0.17-1.el7.x86_64.rpm --nodeps –

rpm -ivh mysql-community-server-8.0.17-1.el7.x86_64.rpm --nodeps --force

rpm -qa | grep mysql

接下来仍然是初始化:

mysqld --initialize; 初始化mysql
chown mysql:mysql /var/lib/mysql -R; 对操作文件赋予权限
systemctl start mysqld.service; 启动mysql服务
systemctl enable mysqld; 设置开机自启

试过第一个命令,好像是mysqld不可以用;

接着使用之前的初始化命令,等着的就是一直报错,报错查询了之后,有的直接查不到,有的解决方案不适用于我这个;特别是第一个报错,0就是官方文档要求是1,一就是不存在这个东西,然后一的报错直接查不到,第二个报错和第三个是一起的,解决方法是bin-log,这个我不会改,也不敢改…

报错:

[ERROR] [MY-000067] [Server] unknown variable ‘lower_case_table_name=0’.
2021-01-19T19:10:36.064108Z 0 [ERROR] [MY-013455] [Server] The newly created data directory /usr/local/mysql/data/ by --initialize is unusable. You can remove it.
2021-01-19T19:10:36.064904Z 0 [ERROR] [MY-010119] [Server] Aborting

找到的另外的配置文件:

[client]
default-character-set=utf8
#password = your_password
port = 3306
socket = /tmp/mysql.sock

[mysqld]
#sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
character-set-server=utf8mb4
port = 3306
socket = /tmp/mysql.sock
basedir = /usr/local/mysql/
datadir = /usr/local/mysql/data/

skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
init_connect=‘SET NAMES utf8’

#错误日志配置

log-error = /usr/local/mysql/log/error.log
pid-file = /usr/local/mysql/run/mysql.pid

#慢日志设置
slow_query_log=1
long_query_time=2
slow_query_log_file=/usr/local/mysql/log/slow_query.log

#bin-log二进制日志设置

log-bin=/usr/local/mysql/log/mysqlbin/mysql-bin

#logging format: mixed|statement|row

binlog_format=statement

#主从配置

#required unique id between 1 and 2^32 - 1 defaults to 1 if master-host is not set

server-id = 1

#Innodb配置
innodb_data_home_dir = /usr/local/mysql/data
#innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/data

#You can set …_buffer_pool_size up to 50 - 80 %

#of RAM but beware of setting memory usage too high

innodb_buffer_pool_size = 128M
innodb_additional_mem_pool_size = 10M

#Set …_log_file_size to 25 % of buffer pool size

innodb_log_file_size = 32M
innodb_log_buffer_size = 10M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 10

[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

结果是没有安装成功。。。。。

初始化命令:

mysqld initialize

报错:命令找不到

bash: mysqld not found;

解决:配置环境变量在etc/profile文件下;

文件的全部内容:

#/etc/profile

#System wide environment and startup programs, for login setup

#Functions and aliases go in /etc/bashrc

#It’s NOT a good idea to change this file unless you know what you

#are doing. It’s much better to create a custom.sh shell script in

#/etc/profile.d/ to make custom changes to your environment, as this

#will prevent the need for merging in future updates.

pathmunge () {
case “😒{PATH}:” in
星号:"$1":星号)
;;
*)
if [ " 2 " = " a f t e r " ] ; t h e n P A T H = 2" = "after" ] ; then PATH= 2"="after"];thenPATH=PATH:$1
else
PATH= 1 : 1: 1:PATH
fi
esac
}

if [ -x /usr/bin/id ]; then
if [ -z “$EUID” ]; then

​ ksh workaround

​ EUID=/usr/bin/id -u
​ UID=/usr/bin/id -ru
​ fi
​ USER="/usr/bin/id -un"
​ LOGNAME= U S E R ​ M A I L = " / v a r / s p o o l / m a i l / USER ​ MAIL="/var/spool/mail/ USERMAIL="/var/spool/mail/USER"
fi

#Path manipulation

if [ “$EUID” = “0” ]; then
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
fi

HOSTNAME=/usr/bin/hostname 2>/dev/null
HISTSIZE=1000
if [ “$HISTCONTROL” = “ignorespace” ] ; then

​ export HISTCONTROL=ignoreboth
else
​ export HISTCONTROL=ignoredups
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

#By default, we want umask to get set. This sets it for login shell

#Current threshold for system reserved uid/gids is 200

#You could check uidgid reservation validity in

#/usr/share/doc/setup-*/uidgid file

if [ $UID -gt 199 ] && [ “/usr/bin/id -gn” = “/usr/bin/id -un” ]; then
umask 002
else
umask 022
fi

for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do
if [ -r “ i " ] ; t h e n i f [ " i" ]; then if [ " i"];thenif["{-#*i}” != “ − " ] ; t h e n . " -" ]; then . " "];then."i”
else
. “$i” >/dev/null

​ fi
​ fi
done

unset i
unset -f pathmunge

export PATH=$PATH:/usr/local/mysql/bin

以上。。。

报错:

#mysqld --initialize

2021-01-24T16:16:28.345590Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.23) initializing of server in progress as process 3892
2021-01-24T16:16:28.347486Z 0 [Warning] [MY-013242] [Server] --character-set-server: ‘utf8’ is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-01-24T16:16:28.348490Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2021-01-24T16:16:28.348505Z 0 [ERROR] [MY-013236] [Server] The designated data directory /usr/local/mysql/data/ is unusable. You can remove all files that the server added to it.
2021-01-24T16:16:28.348652Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-01-24T16:16:28.348934Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23) MySQL Community Server - GPL.

安装报错:

[Server] Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root!

添加配置文件:

explict defaults_for_timestamp=true
user=mysql

文件只读如何修改:

:w!命令强制存盘

新的报错:

2021-01-24T17:09:30.215588Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.23) initializing of server in progress as process 5184
2021-01-24T17:09:30.218209Z 0 [Warning] [MY-013242] [Server] --character-set-server: ‘utf8’ is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-01-24T17:09:30.254015Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-01-24T17:09:31.722667Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-01-24T17:09:35.871163Z 0 [ERROR] [MY-000067] [Server] unknown variable ‘lower_case_table_name=1’.
2021-01-24T17:09:35.873453Z 0 [ERROR] [MY-013455] [Server] The newly created data directory /usr/local/mysql/data/ by --initialize is unusable. You can remove it.
2021-01-24T17:09:35.877439Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-01-24T17:09:38.112006Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23) MySQL Community Server - GPL.

新新的报错:

root@centosxxxxx mysql]# mysqld -initialize
2021-01-24T17:32:35.727186Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.23) starting as process 5587
2021-01-24T17:32:35.757000Z 0 [Warning] [MY-013242] [Server] --character-set-server: ‘utf8’ is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-01-24T17:32:35.798894Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-01-24T17:32:36.945875Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table ‘mysql.plugin’ doesn’t exist
2021-01-24T17:32:37.403518Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2021-01-24T17:32:37.404332Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-01-24T17:32:37.405598Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-01-24T17:32:37.406296Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-01-24T17:32:37.407569Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-01-24T17:32:37.408198Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-01-24T17:32:37.409062Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-01-24T17:32:37.409647Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-01-24T17:32:37.415768Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: ‘::’ port: 33060, socket: /tmp/mysqlx.sock
2021-01-24T17:32:37.817054Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table ‘mysql.gtid_executed’ cannot be opened.
2021-01-24T17:32:37.898731Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table ‘mysql.gtid_executed’ cannot be opened.
2021-01-24T17:32:37.904639Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-01-24T17:32:37.904878Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-01-24T17:32:37.907691Z 0 [ERROR] [MY-010273] [Server] Could not create unix socket lock file /var/lib/mysql/mysql.sock.lock.
2021-01-24T17:32:37.907961Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
2021-01-24T17:32:37.908466Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-01-24T17:32:38.839744Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23) MySQL Community Server - GPL.

改正一:

[root@centosxxxxx mysql]# mysql_upgrade
The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.

最新解决:

[root@centosxxxxx mysql]# mysqld initialize
mysqld: File ‘./binlog.index’ not found (OS errno 13 - Permission denied)
2021-01-24T17:59:16.882755Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.23) starting as process 6295
2021-01-24T17:59:16.885072Z 0 [Warning] [MY-013242] [Server] --character-set-server: ‘utf8’ is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2021-01-24T17:59:16.886821Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-01-24T17:59:16.887076Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.23) MySQL Community Server - GPL.

如果真的有小朋友看到这里的话,哈哈,你真是个小可爱!!!

再见再见,纯属无聊小白的error记录史,博君一笑罢了~

navicat for MySQL for Windows连接

安装正常~~没有安装的同学请移步我的安装教程博客(忘记了过不了审没有发…好尴尬)~

这里推一个别的安装教程

嘿嘿嘿~

连接时出现问题,报错:

1251-Client does not support authentication protocol requested by sever;consider upgrading MYSQL client.

解决办法:参考自博客

提供的完整命令如下:

cmd窗口登陆mysql:

C:\Users\Administrator> sqlplus /nolog

mysql> conn / as sysdba;(注意分号)

mysql> alter user ‘root’@‘localhost’ identified with mysql_native_password by ‘123456’;(注意分号)

Query OK, 0 rows affected (0.10 sec)

mysql> flush privileges;(注意分号)

Query OK, 0 rows affected (0.01 sec)

一些细节:

一共有四个命令,但是我只能正常使用两个;

第一个要求直接以管理员身份运行后输入,我输入后报错;且无法进入mysql命令行;

解决办法:

还是按照之前的打开方式,转到bin目录后,进行登录,然后直接输入第三个命令(第二个试了但是不行)

我的成功截图:

在这里插入图片描述

navicat for mysql 输入password之后连接成功!!!

戳一下重点~

这里解决navicat连接的问题其实本质上是改变了你的密码,或者可以说如果无法连接你可以直接尝试改密,再重新启动~

所以要记住自己的密码已经被改变了噢,再次登录要换换啦!

Get!

在这里插入图片描述
如果对你有帮助的话不要忘记一键三连噢~
谢谢鸭~

初次编写于2021/1/27日;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值