How get or set the root password on lightsail lamp mariadb

0

I created a new lightsail lamp instance using php 8. It gave me mariadb. I think all is set, but I cannot log in as root to mariadb to change the root password or add a user or whatever. I have been searching and trying things for hours. How do I get control of this? I tried changing my my.cnf to have skip-grant-tables, and then I could get in by doing mysql - u root, but it still would not let me change the root password. it says user not in table. I tried changing to table mysql and I can list the root user. If I could find the root password, that would be fine as well as then I could log in with phpmyadmin. I am trying to upgrade my lightsail instance to the latest version. I have everything else working, but can't load the database because I can't access it. Not sure what to try next. Please advise. Thanks in advance for any help.

已提问 1 年前290 查看次数
1 回答
0
已接受的回答

I solved this and it was simple. I am keeping it out here so it may help someone else.

All you do is log into your instance using ssh. In the /home/bitnami folder, there is a file called bitnami_application_password. The password in there is the mysql password for root.

已回答 1 年前
profile picture
专家
已审核 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则