MySQL Change Password command run in MySQL on Ubuntu Server results in strange Character Changes in terminal
NickName:Darren Quinn Ask DateTime:2021-02-14T04:47:02

MySQL Change Password command run in MySQL on Ubuntu Server results in strange Character Changes in terminal

I'm running an Ubuntu Server with MySQL in VirtualBox and trying to change the password for a user.

I run:

sudo mysql -u root -p

to access MySQL. At this point, and with any other commands not trying to see a user's password, everything is working.

In MySQL ( ) I run:

SELECT * FROM mysql.user;

After I run this, the entire display and terminal change. The output and command line are both displaying strange characters. I run this command which works just fine. What gives?

SELECT user FROM mysql.user;

Here are the before and after screen shots:

Screen Shot Before, Screen Shot After

Any help would be greatly appreciated. I have no clue why this is happening. Is this an Ubuntu thing, a MySQL thing or a VirtualBox thing? I'm a noob so this is just an uninformed theory but could it have something to do with MySQL authenticated_string and something to do with hashing?

It actually creates a change that persists even upon typing exit and hitting Enter, exiting MySQL and back to the Ubuntu command line where the weird characters are still showing.

EDIT:

I was following a blog tutorial and inserted <db-password> as the password when creating the MySQL user. I was supposed to insert an actual new password instead but figured I'd just use that. Are the <, - or > characters that I used when setting the user's MySQL password maybe causing this?

Copyright Notice:Content Author:「Darren Quinn」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/66189773/mysql-change-password-command-run-in-mysql-on-ubuntu-server-results-in-strange-c

More about “MySQL Change Password command run in MySQL on Ubuntu Server results in strange Character Changes in terminal” related questions

MySQL Change Password command run in MySQL on Ubuntu Server results in strange Character Changes in terminal

I'm running an Ubuntu Server with MySQL in VirtualBox and trying to change the password for a user. I run: sudo mysql -u root -p to access MySQL. At this point, and with any other commands not try...

Show Detail

How to change MySQL root password via a file?

How do I change the MySQL root password in ubuntu server via a file? The file may be any shell script or normal text file. My try: Normally the below command, in the terminal, changes the passwor...

Show Detail

How to run a MySQL command terminal in Docker, with a docker-compose server

Let's say I have the following compose file : networks: my_network: services: ... mysql: container_name: "mysql" image: "mysql:5.7" volumes: - ./mysql

Show Detail

how to run mysql in ubuntu through terminal

trying to run mysql in ubuntu typing mysql in terminal and getting error ERROR 1045(28000): Access denied for user 'root'@'localhost' (using password: NO) Can anybody please sort out this problem...

Show Detail

MySQL: How to reset or change the MySQL root password?

How do I change the MySQL root password and username in ubuntu server? Do I need to stop the mysql service before setting any changes? I have a phpmyadmin setup as well, will phpmyadmin get upda...

Show Detail

MySQL: How to reset or change the MySQL root password?

How do I change the MySQL root password and username in ubuntu server? Do I need to stop the mysql service before setting any changes? I have a phpmyadmin setup as well, will phpmyadmin get upda...

Show Detail

Error connect to mysql server in ubuntu 12.04

I am trying to connect to mysql server in ubuntu 12.04 from terminal using and password empty("") mysql -u root -p it throwing error ERROR 2002 (HY000): Can't connect to mysql server through soc...

Show Detail

Ubuntu 20.04 set mysql phpmyadmin root password

I installed a LAMP on Ubuntu 20.04. (German) https://wiki.ubuntuusers.de/MySQL/Werkzeuge/ It is always a problem to get the root password to login to the localhost/phpmyadmin. In Ubuntu 18.04 th...

Show Detail

How to run a MySql script in Ubuntu?

I'm using Ubuntu 16.04 and I'm able to use MySql from the command line fine. I can create a db, add tables, add rows to tables, get queries etc. What I can't do is write an sql file and run it. ...

Show Detail

MYSQL8 Permanently change password policy requirements

I am trying to change the password policy requirements in MYSQL8 (Note not MYSQL 5.7). I am using Ubuntu 20.04 server (so no GUI). I can change them within mysql-8 by using lines such as SET GLOBAL

Show Detail