mysql> create user czcb@'10.130.128.130' identified by '123456';
Query OK, 0 rows affected (0.00 sec)
-bash-4.1$ mysql -uczcb
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 52
Server version: 5.6.16 Source distribution
Copyright (c) 2000, 2014, 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>
-bash-4.1$ mysql -uczcb -p123456
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for u
Mysql 本地登陆和密码登陆
最新推荐文章于 2024-09-13 11:09:50 发布
这篇博客介绍了如何在MySQL中创建用户并授予特定主机访问权限。通过示例展示了使用`create user`创建用户,`grant`命令赋予选择、插入、更新权限,以及`flush privileges`刷新权限的过程。同时,博主遇到并解决了用户在本地登录时的1045错误,通过为'localhost'添加权限解决了问题。
摘要由CSDN通过智能技术生成