Guest User

Untitled

a guest
Aug 30th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. $ podman run -P --env MARIADB_ROOT_PASSWORD=bob --name m106 -d mariadb:10.6
  2. 4d8f20922c8cd12ed9fb44e2491d504160a33acdc8f327ef9e29be152848d5c5
  3.  
  4. $ podman port m106 3306
  5. 0.0.0.0:35997
  6.  
  7. $ mariadb -h localhost -P 35997 -u root -pbob --protocol tcp
  8. Welcome to the MariaDB monitor. Commands end with ; or \g.
  9. Your MariaDB connection id is 3
  10. Server version: 10.6.8-MariaDB-1:10.6.8+maria~focal mariadb.org binary distribution
  11.  
  12. Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
  13.  
  14. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  15.  
  16. MariaDB [(none)]> create database some_database;
  17. Query OK, 1 row affected (0.001 sec)
  18.  
  19. MariaDB [(none)]> CREATE USER 'some_user'@'%' IDENTIFIED BY 'some_password';
  20. Query OK, 0 rows affected (0.002 sec)
  21.  
  22. MariaDB [(none)]> GRANT ALL ON some_database.* TO 'some_user'@'%';
  23. Query OK, 0 rows affected (0.002 sec)
  24.  
  25. MariaDB [(none)]> ^DBye
  26.  
  27.  
  28. $ mariadb -h localhost -P 35997 -u some_user -psome_password --protocol tcp some_database;
  29. Welcome to the MariaDB monitor. Commands end with ; or \g.
  30. Your MariaDB connection id is 4
  31. Server version: 10.6.8-MariaDB-1:10.6.8+maria~focal mariadb.org binary distribution
  32.  
  33. Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
  34.  
  35. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  36.  
  37. MariaDB [some_database]> \s
  38. --------------
  39. mariadb Ver 15.1 Distrib 10.5.16-MariaDB, for Linux (x86_64) using EditLine wrapper
  40.  
  41. Connection id: 4
  42. Current database: some_database
  43. Current user: [email protected]
  44. SSL: Not in use
  45. Current pager: stdout
  46. Using outfile: ''
  47. Using delimiter: ;
  48. Server: MariaDB
  49. Server version: 10.6.8-MariaDB-1:10.6.8+maria~focal mariadb.org binary distribution
  50. Protocol version: 10
  51. Connection: localhost via TCP/IP
  52. Server characterset: utf8mb4
  53. Db characterset: utf8mb4
  54. Client characterset: latin1
  55. Conn. characterset: latin1
  56. TCP port: 35997
  57. Uptime: 1 min 45 sec
  58.  
  59. Threads: 1 Questions: 11 Slow queries: 0 Opens: 17 Open tables: 10 Queries per second avg: 0.104
  60. --------------
  61.  
  62. MariaDB [some_database]>
  63.  
Advertisement
Add Comment
Please, Sign In to add comment