码迷,mamicode.com
首页 > 数据库 > 详细

Mysql

时间:2019-01-16 11:49:51      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:root   update   ble   bin   ati   删除   isolation   无法登录   配置环境   

1、查询当前事物隔离级别:SELECT @@tx_isolation;

2、命令行登录mysql,

    先配置环境变量,path:C:\Program Files\MySQL\MySQL Server 5.7\bin

    登录(如果无法登录,就%ProgramData%进入mysql,找到my.ini,最后一行添加skip-grant-tables,重启服务,不输入密码,直接登录)

      use mysql;

        修改密码:5.7之前:update user set password=PASSWORD("123456") where user=‘root‘;

             5.7之后:update mysql.user set authentication_string=password(‘root‘) where user=‘root‘;

    删除最后一行的“skip-grant-tables”,保存并关闭文件,可用密码登录数据库

      use mysql;

        所有ip都可以远程访问:update user set host = ‘%‘ where user = ‘root‘;

        关闭事物自动提交:    

          当前实例数据库:SET autocommit=0

          重启也生效:找到my.ini,[mysqld]下面添加autocommit=0

Mysql

标签:root   update   ble   bin   ati   删除   isolation   无法登录   配置环境   

原文地址:https://www.cnblogs.com/yanghanwen/p/10275548.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!