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 年前檢視次數 291 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南