Difference between revisions of "MySQL"

From Bitnami MediaWiki
Jump to navigation Jump to search
(Created page with "* [https://medium.com/@alef.duarte/cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysqld-sock-155d580f3a06 Medium article] on how to clean out existing insta...")
 
Line 1: Line 1:
 
* [https://medium.com/@alef.duarte/cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysqld-sock-155d580f3a06 Medium article] on how to clean out existing installation before reinstalling
 
* [https://medium.com/@alef.duarte/cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysqld-sock-155d580f3a06 Medium article] on how to clean out existing installation before reinstalling
 +
 +
===Resetting the 'root' password===
 +
This is one of the most vexing actions to execute in all of computing administration. It's unclear if what appears to be just plain wrong advice (issue <code>mysqladmin -u root -p flush-privileges password 'new_passwd'</code>) is installation, platform or sequence dependent, or if it's just plain wrong. I will catalog below the methods that affirmatively DO NOT WORK to save others the trouble.
 +
 +
* From the [https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html MySQL 8.0 Reference Manual]
 +
1. "Log on to your system as the Unix user that the MySQL server runs as (for example, mysql)."  (This means root, since I've never logged in otherwise.)
 +
 +
2. Stop the MySQL server. (No instructions here, so I'm going with <code>systemctl stop mysql</code>. No need for sudo since I'm already root.)
 +
 +
3.

Revision as of 00:18, 31 January 2021

  • Medium article on how to clean out existing installation before reinstalling

Resetting the 'root' password

This is one of the most vexing actions to execute in all of computing administration. It's unclear if what appears to be just plain wrong advice (issue mysqladmin -u root -p flush-privileges password 'new_passwd') is installation, platform or sequence dependent, or if it's just plain wrong. I will catalog below the methods that affirmatively DO NOT WORK to save others the trouble.

1. "Log on to your system as the Unix user that the MySQL server runs as (for example, mysql)." (This means root, since I've never logged in otherwise.)

2. Stop the MySQL server. (No instructions here, so I'm going with systemctl stop mysql. No need for sudo since I'm already root.)

3.