MariaDB登陆


  1. 设置root密码

  2. “mariabd”是新密码
  3. [root@master /]# mysqladmin -u root password mariadb
  4. [root@master /]# mysql -u root -p
  5. Enter password:
  6. Welcome to the MariaDB monitor. Commands end with ; or \g.
  7. Your MariaDB connection id is 6
  8. Server version: 10.0.19-MariaDB MariaDB Server
  9.  
  10. Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
  11.  
  12. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  13. MariaDB [(none)]> show databases;
  14. +--------------------+
  15. | Database |
  16. +--------------------+
  17. | information_schema |
  18. | mysql |
  19. | performance_schema |
  20. | test |
  21. +--------------------+
  22. 4 rows in set (0.00 sec)
  23. MariaDB [(none)]> use mysql;
  24. Reading table information for completion of table and column names
  25. You can turn off this feature to get a quicker startup with -A
  26.  
  27. Database changed
  28. MariaDB [mysql]> show tables;
  29. +---------------------------+
  30. | Tables_in_mysql |
  31. +---------------------------+
  32. | column_stats |
  33. | columns_priv |
  34. | db |
  35. | event |
  36. 远程登陆设置

  37. 以通配符%的内容增加主机/IP地址,也可以直接增加某个特定IP地址
  38. [root@master network-scripts]# mysql -u root -p
  39. Enter password:
  40. MariaDB [(none)]> use mysql;
  41. MariaDB [mysql]> select host,user from user;
  42. +---------------------+------+
  43. | host | user |
  44. +---------------------+------+
  45. | 127.0.0.1 | root |
  46. | localhost | |
  47. | localhost | root |
  48. | master.cloudera.com | |
  49. | master.cloudera.com | root |
  50. +---------------------+------+
  51. 5 rows in set (0.00 sec)

  52. MariaDB [mysql]> update user set host='%' where user='root' and host='localhost';
  53. MariaDB [mysql]> select host,user from user;
  54. +---------------------+------+
  55. | host | user |
  56. +---------------------+------+
  57. | % | root |
  58. | 127.0.0.1 | root |
  59. | localhost | |
  60. | master.cloudera.com | |
  61. | master.cloudera.com | root |
  62. +---------------------+------+
  63. 5 rows in set (0.00 sec)

  64. MariaDB [mysql]> flush privileges;
  65. Query OK, 0 rows affected (0.00 sec)
  66. HeidiSQL客户端登陆

  67. 网络类型:MySQL
  68. 主机名/IP:
  69. 用户名:root
  70. 密码:mariadb
  71. 端口:3306


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29070860/viewspace-1701843/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29070860/viewspace-1701843/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值