Forgotten root password (MySql)

Hello

I have forgotten my root password to the local MySQL.
If I reset over the console, I no longer have access to my previous projects.

In a project, unfortunately, the password is not found in plain text (is encrypted).

How can I reset the password so that all projects continue to work?

Bye
Mansaylon

Or another way.
How can I assign the new password to existing projects?

The easiest way would be really, if I could look in the project the password in the script.

just reset the mysql password, edit the connections and upload project again

You need to differentiate what are you talking. Problem is with your deployed projects? Then enter on production enviroment yourproject_url/_lib and reconfigure your mysql connection.
If problem comes with connection of your projects in development, then just Database->“Edit Connection” and change the pass to the new pass

Set the project’s database password to a known value e.g., “XYZ”. Log in as root user in MySQL, set the project user’s (ex “Bob”) password via:

USE mysql; UPDATE user SET authentication_string = PASSWORD(“XYZ”) WHERE User = ‘Bob’; FLUSH PRIVILEGES;

Then edit your SC connections for the new password.

That’s my big problem. I opened 2 projects with the root user.
I can reset the root password via console:
https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password

And as I said, I can then log in with root via phpMyAdmin.

Then tried to re-enter the connection several times.
Result = Connection refused mysqli::character_set_name(): invalid object or resource mysqli (see above).

Something is wrong here

Great. Then you can create a non-root user and grant that user privileges on your database.

ScriptCase connections can become screwy if anything ever goes wrong with them. Like you can’t really delete them, not all the way. This is particularly irritating in the deployed environment.

NetMake might fix it. I’ve been waiting a few years for that.

So this is a good time to do the correct thing and create a non-root mysql user for your database, and then create a new connection for that non-root user. That should work OK, just don’t go changing the user information after that or you might be right back here.

Yes.
I’m a little further.
Create a new user for a project and assign it to the project in Scriptcase. No mistake :wink:
Rebuilt the source code and published it to the directory /var/www/http/test/ on the same server.

When I call the project now, (www.domain.ch/test) the error still comes with the wrong root connect.

Access denied for user ‘root’@‘localhost’ (using password: YES)

Regenerating the source code does not apply the new MySql user. What am I doing wrong?

When you deploy your project - the first access from a browser - you set up the connections. I think the URL to do that manually is http://yoursite/pathtoproject/_lib but I’m not sure of that.

You could move the old project aside and re-deploy the whole thing a lot faster than waiting for us to answer a forum question, and it would be solved.