drlippman/IMathAS

Reset mysql password

Closed this issue · 4 comments

Initially Imathas was setup by user without passwords. After running awhile, and reset the user with a new passwords for security and modify the setting in "config.php", but can't login again. And check the mysql error log, it shows the error:

Access denied for user 'root'@'localhost' (using password: NO)

Where do I need to modify for the mysql connection corrected?

To change the mysql password, you'll need to change it directly in the database, using some database admin tool. Once it's set, make sure to update your config.php and store it as $dbpassword.

Note that the database password is totally different than the password you use to login to the system itself as an admin user.

In my last posted, I changed the MySQL user's passwords, actually "root" itself, directly in mysql database, and change updated config.php; the problem is still there.

However, re-install the IMathAS (in different folder) from github source with another MySQL database and user with passwords as same as ones in previous IMathAS installed; it works (for the new installed IMathAS system).
Since the different IMathAS has the same root setting for IMathAS but using different databases, I try to copy the new "config.php" into the previous IMathAS, with database updated for the old one and login again; it is still failed. Anything I forgot here? Thanks.

Access the MySQL databse directly from the command line (CLI) and type:
mysql -u root -p
It will prompt you for a password, can you at least get to this password prompt? What happens if you just hit enter (empty password)?

I think I found the problem. I don't know when and why I use the "admin/passwords" as admin of the previous IMathAS system, but not "root/passwords". After installing the last IMathAS and following the online note, now it works.

Thanks all