MySql 启动与连接

来源:互联网 发布:lapse it 编辑:程序博客网 时间:2024/05/30 19:32

一. MySql的启动停止
在window下 “开始”-〉“运行”-〉输入“services.msc”可以查看MySQL服务是否已经启动。可以手动启动,也可以dos下启动。
服务列表
1. dos下启动为“net start mysql”
2. 有启动就有停止,停止MySQL服务“net stop mysql”(这里输入的是MySQL服务的名字。如果你的MySQL服务的名字是DB或其它名字,你应该输入“net start DB”)。
二. MySql的连接
1. 单击“开始”-〉“运行”,输入“cmd”,回车,弹出命令行
2. 输入 mysql –h localhost –u root –p
3. 输入完后回车,提示你输入密码。输入配置MySQL时设置的密码
4. 当出现如下信息就成功连接

Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 11Server version: 5.5.49 MySQL Community Server (GPL)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

三. 错误解决
1. 在dos下“net start mysql” 不能启动mysql!提示发生系统错误 5;拒绝访问!
原因:当前用户的操作权限太低了
解决:在开始菜单的搜索框张输入cmd,然后右键单击,并选择以管理员身份运行!

0 0