bash-4.2# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with; or \g.
Your MySQL connection id is 11
Server version:5.7.20Copyright(c)2000,2017, 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> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_root_password';
Query OK,0 rows affected(0.00 sec)
mysql> CREATE DATABASE guacamole_db;
Query OK,1 row affected(0.00 sec)
mysql> CREATE USER 'guacamole_user'@'%' IDENTIFIED BY 'guacamole_user_password';
Query OK,0 rows affected(0.00 sec)
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'%';
Query OK,0 rows affected(0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK,0 rows affected(0.00 sec)
mysql> quit
Bye
mysql> USE guacamole_db;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with-A
Database changed
mysql> SHOW TABLES;+---------------------------------------+| Tables_in_guacamole_db |+---------------------------------------+| guacamole_connection || guacamole_connection_group || guacamole_connection_group_permission || guacamole_connection_history || guacamole_connection_parameter || guacamole_connection_permission || guacamole_sharing_profile || guacamole_sharing_profile_parameter || guacamole_sharing_profile_permission || guacamole_system_permission || guacamole_user || guacamole_user_password_history || guacamole_user_permission |+---------------------------------------+13 rows inset(0.00 sec)
退出bash终端:
exit
在浏览器中访问Guacamole
1.在Docker中启动guacd:
docker run --name example-guacd -d guacamole/guacd