您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

通过cmd命令连接mysql

2025/9/10 8:14:05发布92次查看
通过cmd的命令窗口连接mysql,只需要在命令行中输入 mysql -uroot -p123456 .它会出现这样的提示:mysql不是内部或外部命令。解决办法是在环境变量的path路径下加入 c:program filesmysqlmysql server 5.6bin。 如下图: 将mysql配置到环境变量后,在cmd的命
通过cmd的命令窗口连接mysql,只需要在命令行中输入 mysql -uroot -p123456 .它会出现这样的提示:“mysql不是内部或外部命令”。解决办法是在环境变量的path路径下加入 c:program filesmysqlmysql server 5.6bin。
如下图:
将mysql配置到环境变量后,在cmd的命令窗口输入 “mysql -uroot -p123456”即可。如下图:
到此就可以通过cmd命令连接mysql数据库了。需要注意的是-u后面是连接数据库的用户名,没有空格。-p后面是连接密码,,也没有空格。
命令为:mysql -uroot -p123456
如果你在命令后面加了分号会出现:
c:usersadministrator>mysql -uroot -p123456;
warning: using a password on the command line interface can be insecure.
error 1045 (28000): access denied for user 'root'@'localhost' (using password: y
es)
解决办法就是不要加分号。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product