1.用root 进入mysql后
mysql>set password =password('你的密码');
mysql>flush privileges;
2.使用GRANT语句
mysql>grant all on *.* to 'root'@'localhost' IDENTIFIED BY '你的密码'with grant option ;
mysql>flush privileges; 3.进入mysql库修改user表
mysql>use mysql;
mysql>update user set password=password('你的密码') where user='root';
mysql>flush privileges;

mysql如何设置密码的更多相关文章

  1. mysql数据库设置密码

    1.用SET PASSWORD命令 mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); ...

  2. Ubuntu18.04安装MySQL(未设置密码或忘记密码)

    一 安装MySQL sudo apt-get update sudo apt-get install mysql-server 二 密码问题 1 安装时提示设置密码 这种情况没什么问题,通过已下命令登 ...

  3. window下mySql数据库设置密码

    方法一:用setpassword命令 首先登陆MySQL:mysql -u root 格式:mysql> set password for 用户名@localhost = password('新 ...

  4. 安装完MySQL数据库设置密码

    对于windows平台来说安装完MySQL数据库后,系统就已经默认生成了许可表和账户,你不需要像在Unix平台上那样执行 mysql_install_db脚本来生成帐户和相应权限许可表.但是如果不是用 ...

  5. mysql root设置密码 linux

    成功方案 mysqld_safe --user=mysql --skip-grant-tables --skip-networking & [root@localhost ~]# mysql ...

  6. ubuntu18.04 首次登录mysql未设置密码或忘记密码解决方法

    1.首先输入以下指令: sudo cat /etc/mysql/debian.cnf运行截图如下: 2. 再输入以下指令: mysql -u debian-sys-maint -p//注意! //这条 ...

  7. 配置mysql 及 设置密码

    https://jingyan.baidu.com/article/8cdccae946133f315513cd6a.html

  8. mysql设置密码

    mysql如何设置密码 有很多方法: 1.用root 进入mysql后 mysql>set password =password('你的密码'); mysql>flush privileg ...

  9. CentOS安装MySQL

    好记性不如烂笔头,记录一下 yum list installed | grep mysql #检查是否安装了mysql yum -y remove mysql-libs.x86_64 #卸载已经安装的 ...

随机推荐

  1. 软工实践练习-Git初接触

    第一次听到Git,有点不知所云,听了实践课老师的讲解,才明白了Git作为最先进的分布式版本控制系统的重要性. 至于Git的安装和使用仍旧是自己摸索着去完成了,当然在这过程中也是遇到了很多的问题. 接下 ...

  2. Java 并发编程 Executor

    Executor框架是指java 5中引入的一系列并发库中与executor相关的一些功能类,其中包括线程池,Executor,Executors,ExecutorService,Completion ...

  3. Hamcrest

    Hamcrest比起JUnit的assert系列方法来,有更好的可读性,它按照参数从左到右的符合自然的顺序来展示,如actual is(notNullValue()),是对测试断言的改进.同时不会被哪 ...

  4. HDU 4901 The Romantic Hero

    The Romantic Hero Time Limit: 3000MS   Memory Limit: 131072KB   64bit IO Format: %I64d & %I64u D ...

  5. POJ2263 Heavy Cargo

    Heavy Cargo Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4004   Accepted: 2124 Descr ...

  6. ubuntu设置开机启动图形应用程序,替换默认图形桌面

    直接将启动程序放在rc.local即可.但是如果自动启动的程序奔溃后,会返回到ubuntu的unity桌面系统. 我遇到的问题是程序还有调用 xset 去定时关闭屏幕.在桌面启动后调用没问题.如果rc ...

  7. C++ 中常见预定义宏的使用

    http://blog.csdn.net/hgl868/article/details/7058906 替代字符串: #define DOWNLOAD_IMAGE_LOG /var/log/png.l ...

  8. jQuery返回顶部(精简版)

    jQuery返回顶部(精简版) <!DOCTYPE html><html lang="en"><head> <meta charset=& ...

  9. Laravel教程 四:数据库和Eloquent

    Laravel教程 四:数据库和Eloquent 此文章为原创文章,未经同意,禁止转载. Eloquent Database 上一篇写了一些Laravel Blade的基本用法和给视图传递变量的几种方 ...

  10. Jenkins 搭建U3D自动发布 IOS

    http://www.cnblogs.com/yinghuochong/archive/2013/09/01/3294940.html 1.安装包,工具略过. 2.插件管理 Subversion Pl ...