RolandoMySQLDBA

Jan 29, 2021 20:57
Post Updated
Jan 29, 2021 20:51
Nice working with you today
Jan 29, 2021 20:51
OK I will
Jan 29, 2021 20:49
If my answer and this session really helped, please hit the check mark and award the bounty. I am asking because most people forget to do both
Jan 29, 2021 20:47
If you are doing local development, it's not really needed.
Jan 29, 2021 20:45
mysqladmin -u root password NEWPASS
Jan 29, 2021 20:45
To set a new password for root when root has no password, run this
Jan 29, 2021 20:45
You can lave it running
Jan 29, 2021 20:43
You create databases when you login to mysql
Jan 29, 2021 20:42
Actually, doing that might invoke the dmg version, but it should not work since mysqld is running right now
Jan 29, 2021 20:41
If it does not, then just stick with the brew services approach
Jan 29, 2021 20:41
See if it behaves
Jan 29, 2021 20:41
Try it
Jan 29, 2021 20:39
Did you have fun today ???
Jan 29, 2021 20:38
Never do homebrew and dmg on the same machine
Jan 29, 2021 20:38
Use brew services to start, restart, or stop mysql
Jan 29, 2021 20:38
home brew install of mysql has root@localhost with no password (you should make one)
Jan 29, 2021 20:37
So here are the takeaways
Jan 29, 2021 20:36
This constitures the way to start and stop mysql on a Mac
Jan 29, 2021 20:36
brew services restart mysql
Jan 29, 2021 20:35
One more
Jan 29, 2021 20:35
brew services start mysql
Jan 29, 2021 20:35
Try starting it back with
Jan 29, 2021 20:33
brew services stop mysql
Jan 29, 2021 20:32
brew service stop mysql
Jan 29, 2021 20:32
You can use brew services to do the shutdown
Jan 29, 2021 20:32
Sorry
Jan 29, 2021 20:31
Does it show a status ?
Jan 29, 2021 20:31
brew services status mysql
Jan 29, 2021 20:29
At the command line run this
Jan 29, 2021 20:29
Let find out if mysqld is a homebrew
Jan 29, 2021 20:28
in 99% of the cases
Jan 29, 2021 20:28
mysql> exit
Jan 29, 2021 20:27
It seems like you have a decent install running now without confusion
Jan 29, 2021 20:27
5
A: Test MySQL credentials from Linux command line?

RolandoMySQLDBA@Phil's Answer and @Mr.Brownstone's Answer should suffice for your question, so +1 for both of them. For the following, let's assume you are logging in with username myuser Once you have connected to mysql, you should run the following query: SELECT USER(),CURRENT_USER(); USER() reports how...

Jan 29, 2021 20:27
I wrote about this many times
Jan 29, 2021 20:26
This shows me what MySQL lets you login with and how mysqld decided to authenticate you
Jan 29, 2021 20:25
SELECT USER(),CURRENT_USER)();
Jan 29, 2021 20:25
Run this
Jan 29, 2021 20:25
It's ajust educated guess since your password worked before but now does not. The two installs must be the only plausible explanation
Jan 29, 2021 20:24
Please run SHOW GRANTS;
Jan 29, 2021 20:24
The homebrew install has a root user with no password
Jan 29, 2021 20:24
This means you had the dmg install with a password running. We shut it down from within.
Jan 29, 2021 20:23
Hmm OK
Jan 29, 2021 20:22
No password
Jan 29, 2021 20:22
mysql -uroot
Jan 29, 2021 20:22
run this
Jan 29, 2021 20:22
Since this a homebrew install (taking a chance here)
Jan 29, 2021 20:22
Try this for laughs
Jan 29, 2021 20:22
Maybe