# mysql -u root -p -h 127.0.0.1 -P 3307
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 12.2.2-MariaDB-ubu2404 mariadb.org binary distribution
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
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> select version();
+------------------------+
| version() |
+------------------------+
| 12.2.2-MariaDB-ubu2404 |
+------------------------+
1 row in set (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql>
AMH软件商店中主要的网站环境是lnmp、lamp、lngx,主要是原版的mysql,
要mariadb的话可以在容器部署,在AMH面板『容器』点击创建,填写:
执行即可,安装的mariadb 12另需其它版本相应修改,上面的
root用户密码test_passwd,端口3307,可以改成自己需要的。
安装完成后,命令端及网站程序可以用127.0.0.1,3307端口连接: