Difference between revisions of "MySQL"

From Bitnami MediaWiki
Jump to navigation Jump to search
m (User moved page Mysql to MySQL)
Line 9: Line 9:
 
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.)
 
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.
+
3. Doesn't work. Still getting bounced w/ root password.  
  
 +
===Docker===
 
Abandoning this. Going to try and run mysql in a docker container. [https://docs.docker.com/engine/install/ubuntu/#install-from-a-package Here] are the docker installation instructions. And now back to our program on [https://dev.mysql.com/doc/refman/8.0/en/linux-installation-docker.html dev.mysql.com]
 
Abandoning this. Going to try and run mysql in a docker container. [https://docs.docker.com/engine/install/ubuntu/#install-from-a-package Here] are the docker installation instructions. And now back to our program on [https://dev.mysql.com/doc/refman/8.0/en/linux-installation-docker.html dev.mysql.com]
 +
 +
Pull in the latest or specified (8.0) mysql image:
 +
docker pull mysql/mysql-server
 +
This results in:
 +
bch@redbox:~$ sudo docker pull mysql/mysql-server:8.0
 +
[sudo] password for bch:
 +
8.0: Pulling from mysql/mysql-server
 +
501550cfd5c0: Pull complete
 +
e0509d775110: Pull complete
 +
d5a01765d011: Pull complete
 +
970507e942eb: Pull complete
 +
Digest: sha256:0bb21c0f1aa9296e7deafacec5703b80e4d923dfdfcaa2efbe0c8377a8592128
 +
Status: Downloaded newer image for mysql/mysql-server:8.0
 +
docker.io/mysql/mysql-server:8.0

Revision as of 02:39, 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. Doesn't work. Still getting bounced w/ root password.

Docker

Abandoning this. Going to try and run mysql in a docker container. Here are the docker installation instructions. And now back to our program on dev.mysql.com

Pull in the latest or specified (8.0) mysql image:

docker pull mysql/mysql-server

This results in:

bch@redbox:~$ sudo docker pull mysql/mysql-server:8.0
[sudo] password for bch: 
8.0: Pulling from mysql/mysql-server
501550cfd5c0: Pull complete 
e0509d775110: Pull complete 
d5a01765d011: Pull complete 
970507e942eb: Pull complete 
Digest: sha256:0bb21c0f1aa9296e7deafacec5703b80e4d923dfdfcaa2efbe0c8377a8592128
Status: Downloaded newer image for mysql/mysql-server:8.0
docker.io/mysql/mysql-server:8.0