1. 安装好mysql本地环境
从官网下载安装完成之后,可以通过任务管理查看服务。看到mysqld的服务程序。说明安装成功。(平常工作用不到时可以不设置开机自启动)
2. 修改具体步骤(下方有图片操作记录,具体可看转载内容。)
2.1 用root身份登bai入 进入mysql库du 修改zhiuser表即可。
2.2 DAO操作:(加粗部分为我们输入的内容)
G:\phpStudy\MySQL\bin>mysql -uroot -proot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 391
Server version: 5.0.51b-community-nt-log MySQL Community Edition (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> use mysql;
Database changed
mysql> update user set user=‘lds’ where user=‘root’;
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
至此,完成修改。
3. 参考文章。
以上转载自 https://zhidao.baidu.com/question/685816812791774932.html
补充一下怎么登录mysql(不同用户)
首先,保证你的环境变量和用户变量都配置了MySQL的bin目录。
然后打开黑窗口(CMD)
从图片可以看出,你希望用什么用户登录 -u后面就写什么。对应用户密码填写正确即可。
(接受评论建议,以后写文章要好好写啦。学如逆水行舟,不进则退。)