Author:
erics, March 16th, 2022
Had an old server, needed to get root.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
service mysql stop ~OR~ service mysqld stop cd /etc/init.d; ./mysql<tab> start --skip-grant-tables mysql> update mysql.user set Password=PASSWORD('secret') where user='root'; mysql> flush privileges; mysql> ^D service mysql stop service mysql start ~OR~ service mysqld stop service mysqld start |
For MySQL 5.7: https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html For some other v5.7 nodes, I had admin access via a different user’s login, so all I needed was this:
|
ALTER USER 'root'@'localhost' IDENTIFIED BY 'secret'; ALTER USER 'root'@'%' IDENTIFIED BY 'secret'; |
Categories: How-To's, Technology Tags: 5.5, Flush, Grant, init.d, Lost, mysql, MySQL 5.5, Password, privileges, recover, Recovery, Reset, root, service, Skip, skip-grant-tables, Tables, User
|
No comments
Author:
erics, February 19th, 2022
I went to perform a yum update and got the following error:
|
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository. Failing package is: mysql-community-server-5.7.37-1.el7.x86_64 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql |
SOLUTION: Import the needed new key and manually edit the config files before retrying the yum update.
|
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 |
I had to edit two files: mysql-community-source.repo and mysql-community.repo
For 5.7 – add -2022 to the key name: i.e.: ORIGINAL:
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql |
MODIFY ONE […]
Categories: How-To's, Technology Tags: GPG, GPG Key, key, mysql, Yum, yum update
|
2 comments
Author:
erics, May 26th, 2021
|
mysql -N -B -e 'show variables like "%datadir%";' |
-N: No column headers -B: Batch mode – use tabs as field separators https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-output-formats.html Multiple Formats Available: Table Format – use –result-format=table, alias –table Tab Separated Format – use –result-format=tabbed, alias –tabbed Vertical Format – use –result-format=vertical, alias –vertical JSON Format Output – use –result-format=VALUE, alias –json[=pretty|raw|off] VALUE may be one of: json or […]
Categories: How-To's, Technology Tags: --tabbed, cli, Format, mysql, output, Plain, Table, Vertical
|
No comments
Author:
erics, March 22nd, 2021
Ah, the power of grep!
|
mysql --help | grep 'Default options' -A 1 |
Categories: How-To's, Technology Tags: howto, my.cnf, mysql, tips
|
No comments
Author:
erics, November 18th, 2020
|
yum install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm yum install mysql-community-server mysql-community-client mysql-community-common mysql-community-devel mysql-community-libs nagios-plugins-all nagios-plugins-mysql sysbench grep 'temporary password' /var/log/mysqld.log 2020-11-18T15:17:13.884662Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ujtBqhNzE0>8 mysql_secure_installation -p'ujtBqhNzE0>8' systemctl enable --now mysqld mysql -uroot -p mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'secretStr0ngPassw0rd!'; |
Categories: How-To's, Technology Tags: AWS, AWS Linux, AWS Linux 2, howto, Install, Linux, mysql, MySQL 8, tips
|
No comments
Author:
erics, April 5th, 2020
As a non-root user:
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" brew install cmake brew install openssl brew install mysql@5.6 brew services start mysql@5.6 brew link mysql@5.6 --force mysql |
Make sure your PATH contains /usr/local/bin
Categories: How-To's, Technology Tags: /usr/local, /usr/local/bin, 5.6, apple, Brew, cmake, Homebrew, howto, Install, Launchd, Link, MacOS, macosx, mysql, MySQL 5.6, mysql@5.6, openssl, Services, tips
|
No comments
Author:
erics, January 21st, 2020
|
echo `mysql -uyourUser -pyourPassword -B --disable-column-names -e "SELECT CONCAT('DROP DATABASE ', SCHEMA_NAME, ';') FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'yourPrefix%';"` | mysql -uyourUser -pyourPassword -B |
Categories: How-To's, Technology Tags: Concat, Database, DB, drop, DROP DATABASE, drop database like, howto, INFORMATION_SCHEMA, INFORMATION_SCHEMA.SCHEMATA, LIKE, Match, mysql, SCHEMA_NAME, SCHEMATA, tips
|
No comments
Author:
erics, September 26th, 2019
Make It Faster: Improving MySQL Write Performance for Tungsten Cluster Slaves
Categories: Architecture, cctrl, Composite, Mastering Tungsten Clustering, Question Tags: HA, mysql, Performance, Performance Tuning, QA, Shell, Tungsten
|
Comments Off on Make It Faster: Improving MySQL Write Performance for Tungsten Cluster Slaves
Author:
erics, August 29th, 2019
Why does the DIY approach fail to deliver vs. the Tungsten Clustering solution for geo-distributed MySQL multimaster deployments? Before we dive into the 10 reasons, note why commercially-supported enterprise software is less risky and in fact less costly.
Categories: Connector, Geo-Distributed, Maintenance, Multimaster, Multimaster MySQL, Multisite Tags: AWS, Clustering, Disaster REcovery, High Availability, mysql, proxy, Replicator
|
Comments Off on 10 Reasons Why Tungsten Clustering Beats the DIY Approach for Geo-Distributed MySQL Deployments
Author:
erics, August 26th, 2019
Zero-Downtime Cluster Maintenance: Comparing the Procedures for Upgrades versus DB/OS Maintenance
Categories: Architecture, cctrl, Composite, Datasource, Downtime, Maintenance, Mastering Tungsten Clustering, Question, Shun, Zero-Downtime Tags: Command, HA, Master, mysql, QA, recover, Shell, Slave, Switch, Tungsten, welcome, Zero
|
Comments Off on Zero-Downtime Cluster Maintenance: Comparing the Procedures for Upgrades versus DB/OS Maintenance