MySQL query action output language - mysql

I'm hoping this is a simple question. I recently installed MySQL Workbench, and thought everything was going fine, until I noticed the output of messages at the bottom. They're in a foreign language. See attached screenshot. I tried the same queries in phpMyAdmin and get similar results.
Server connection collation: utf8mb4_general_ci (I tried to change to utf8_general_ci but it won't let me)
Any help is greatly appreciated.

Try changing your my.ini file to the following:
lc-messages=en_US
or run the command prompt and in the mysql prompt do:
SET lc_messages = 'en_US';
Check the following reference

Related

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?
I believe this was a character encoding issue in MySQL because SELECT * FROM mysql.user WHERE user = 'root'; doesn't have the same issue. Because of that, I believe the issue only occurs at that one user's password data point where the <, - and > characters were used. Maybe someone else can provide a better answer explaining more thoroughly why this occurs. Specifically, I'm curious as to how this issue in MySQL is then able to affect the appearance of the Ubuntu Command Line once the MySQL shell is exited.

Mysql Changing secure_file_priv in terminal MAC OS

new stackflow user here.
Im also new with SQL and learning to use it with MAC OS and MySQL Workbench 8.0.
My problem is that I cant change secure_file_priv value. Its NULL and stays NULL no matter what.
I have tried to use tips and tricks found from stackoverflow but the value stays the same whatever code I try to put in terminal.
Basically if I start with /usr/local/mysql/bin/mysql -uroot -p in terminal. Is this wrong start?
Because after typing that in, all I have managed to do in terminal is 'show variables;'.
Any other code I've found from internet (regarding this problem) doesn't return anything.
Idea behind everything is to use LOAD DATA INFILE function in MySQL Workbench. But error 1290 denies that. Or LOAD DATA LOCAL INFILE which returns error code 3948
Thanks in advance.

Warning TIMESTAMP with implicit DEFAULT value is deprecated

Once again I need your help:) . I am new to mysql and today when I decided to do some work and start the MySQL server, I get the following warning
"[Warning] TIMESTAMP with implicit DEFAULT value is deprecated".
I know I should change something somewhere but I don't know where... I'm trying to start MySQL server with executing mysqld file in bin directory. I would be very grateful if someone manage to explain me why MySQL server does not want to start and what can I do... Thank you in advance.
You'll want to set explicit_defaults_for_timestamp
Append --explicit_defaults_for_timestamp=# onto your command line.
Setting it in your option file my.ini / my.cnf / etc - Option-File Format.
setting it as a system variable.
That is caused when upgrading from MySQL 5.5 to MySQL 5.6. It looks like you have more than one version of mysql on your computer. Read here for more.
if u r using mysql 5.6 and getting
"[Warning] TIMESTAMP with implicit DEFAULT value is deprecated".
when u use mysqld in commandline, just don't worry, don't panic...
What u have to do is go in start menu-> programs-> mysql-> mysql server 5.6-> mysql commanline client.(Windows)
u will be asked to enter password, enter ur root password.
then u will see
mysql>
start creating database directly
Try it its simple, but will solve ur problem... it solved mine!

Password Hash function throwing error 1146

I have a query like this
UPDATE `database`.`user`
SET `Password`=Password("test1234!##$")
WHERE `UserID`='1234';
I ran this once and it updated the Password fine. I changed the case of the t in test and it started to fail with the message
Error Code: 1146. Table 'database.Unknown' doesn't exist.
After some experimentation I found that removing the $ in the string allowed the query to run successfully. I attempted to escape the character with / but the error still occurred. The collation on the column is utf8 and it is varchar(50).
The query itself is being executed in MySQL Workbench 5.2.47 and on MySQL version 5.1.62 Community Edition.
Can anyone enlighten me on why the $ is being troublesome.
EDIT: It is now occurring without any of the special characters. I also am aware there are much safer ways of hashing passwords. I am just curious at this point why the specific error is occurring.
First deduct the issue is from workbench:
Log in from command prompt (mysql -u Username -pPassword -h hostname) or with phpmyadmin and then try executing the query.
If that works, it's the workbench.
Then you might first want to just delete all configured connection settings in the workbench and re-adding them. This might already solve your problem.
If the problem maintains, you can try to re-install workbench.
Ended up being that a trigger existed that had this in it
INSERT INTO Unknown VALUES(1);
I don't know what the purpose of this is but it obviously was causing the issue. Thanks for the help regardless everyone.

What is the default mysql command timeout in Rails?

This sounds like a very simple question, but for some reason I couldn't find an answer for it anywhere.
I checked mysql server setting and it looks like there is no such a variable - for commands, it is probably up to a client:
show variables where variable_name like '%timeout%'
I'm trying to figure out when active record mysql adapter would timeout a mysql query/command if it ever would.
There are related questions, but not rails-specific: mysql Command timeout error
Thank you.