mysql -u root -p后版本号和显示的对不上咋办呀
2Windows PowerShell Windows PowerShell X Y X
Nindows PowerSheLL
版权所有(C)MicrosoftCorporation.保留所有权利
安装最新的PowerSheLl,了解新功能和改进!https://aka.ms/PSWindows
PS C:Users\minna> cd D:\phpstudy_pro\Extensions\MySQL5.7.26\bin
PSD:phpstudy_pro\Extensions\MySQL5.7.26\bin>mysgL-uroot-p
Enterpassword:******
NeLcometotheMySQLmonitor. Commandsendwithorg.
Your MySOL connection idis8
serververs1on:8.0.32MySOLCommunity Server-GPL
Copyright(c)2000,2023,Oracleand/oritsaffiliates.
Oracleisa registered trademark of Oracle Corporation and/or its
affiliates.Othernames may be trademarks of their respective
owners.
Type help: or h' for help. Typec'to clear the current input statement
mysql>
是不是装有8.0.32版本的,且在默认端口运行着
参考:https://blog.csdn.net/weixin_43404791/article/details/105174074
[root@hadoop1 ~]$ mysql -uroot -p
-bash: mysql: command not found
[root@hadoop1 bin] /app/mysql-5.7.26/bin/mysql -u root -p
Enter password:
[root@hadoop1 bin]# ln -s /app/mysql-5.7.26/bin/mysql /usr/bin
[root@hadoop1 bin]# whereis mysql
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/share/mysql
[root@hadoop1 bin] mysql -u root -p
Enter password:
可以看看启动的是不是你安装的mysql。如果是通过服务启动的,就看看服务列表中的mysql服务中对应的目录是哪里。