mysql远程登录并设置密码
2016-06-21 14:49
561 查看
设置密码为password进行远程登录
[root@localhost ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 88 Server version: 5.6.29-76.2-log Percona Server (GPL), Release 76.2, Revision ddf26fe Copyright (c) 2009-2016 Percona LLC and/or its affiliates Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> grant all on *.* to root@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec) mysql> exit
通过user数据库修改用户密码
mysql>use user; mysql>UPDATE user SET password=PASSWORD('123456') WHERE user='root'; mysql>FLUSH PRIVILEGES;
相关文章推荐
- Wamp与LNMP环境下的mysql进入后查看数据库时报错的不同解决方法
- 扛得住双11的Mysql---mysql优化
- MySQL的InnoDB索引原理详解
- MySQL通过增加用户实现远程连接数据库
- mysql分组取每组前几条记录
- Mysql二进制安装过程
- MySQL5.6 PERFORMANCE_SCHEMA 说明
- MySQL中索引和优化的用法总结
- 【mysql学习笔记】-事务处理
- Vmware下Mysql5.6.30主从配置
- windows MySQL5.7.9免安装版配置方法
- mysql中插入中文数据
- MySQL设置允许用户远程登录
- mySQL控制台字体颜色调整
- MySQL创建用户与授权
- mysql 动态行转列
- Navicat for MySQL 的使用方法
- mysql 查询今天、昨天、上月、本月的数据
- mysql管理常用操作
- MySQL输出脚本文件到指定文件夹