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. navigationBar设置透明度

    将NavigationBar设置透明(仅将指定视图控制器进行透明处理),步骤如下:1.在视图控制器的头文件中实现UINavigationControllerDelegate,例如:@interface ...

  2. php 字符串的一些操作,以便记忆

    php 字符串的操作 trim($str,'特殊字符')-----去除字符串左右两边的字符,返回字符串 ltrim(),rtrim()--------------------左,由两边,与trim() ...

  3. Spring MVC框架

    这个Spring Web MVC 框架提供了模型视图控制器的架构,这种结构能够被用来开发灵活的和松耦合的Web应用程序. 这种MVC模式能够将应用程序分离成不同的层面,(输入逻辑,业务逻辑,UI逻辑) ...

  4. js实现开灯关灯效果

    <!DOCTYPE html> <html> <body> <script> function changeImage() { element=docu ...

  5. ZOJ 3201 树形dp+背包(简单题)

    #include<cstdio> #include<vector> #include<cstring> #include<iostream> using ...

  6. zoj3882 博弈

    我理解错题目意思,稀里糊涂A了.其实就是先手必胜. #include<stdio.h> int main() { int n; while(scanf("%d",&am ...

  7. Html-Css-li标签增加图片

    制作一个需要显示颜色的圆点. <style> .item1 ul{list-style:none} .item1 li{padding-left:20px;background:url(圆 ...

  8. jquery插件库

    jQuery由美国人John Resig创建,至今已吸引了来自世界各地的众多javascript高手加入其team. jQuery是继prototype之后又一个优秀的Javascrīpt框架.其经典 ...

  9. core dump gdb调试

    core dump又叫核心转储, 当程序运行过程中发生异常, 程序异常退出时, 由操作系统把程序当前的内存状况存储在一个core文件中, 叫core dump. (linux中如果内存越界会收到SIG ...

  10. MyEclipse使用SVN进行项目版本控制

    一.搭建SVN服务器. 例如,使用VisualSVN Server,下载后安装. (1)在Repositories(版本库)上右击,新建Repository,选择Regular FSFS reposi ...