MySQL / MariaDB client slow to start/load for user A but not for user B
Given the above, we felt that ruled out an issue with the DB itself. We did verify that each user was using the same mysql client and had similar ENV/PATH setups.
After giving it some thought we had 'User A' to start the client in verbose mode, which gave us our answer.
-bash-4.3$ mysql --verbose -u userA -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10410
Server version: 5.0.45 MySQL Community Server (GPL)
Reading history-file /home/userA/.mysql_history <----------------- HERE IS THE ISSUE
So if we take a look at this history file of 'User A', it's a 160M file:
-bash-4.3$ ls -lh ~/.mysql_history
-rw------- 1 userA staff 160M Jul 6 14:48 /home/userA/.mysql_history
Where as 'User B' had a much smaller file:
-bash-4.3 ls -lh ~/.mysql_history
-rw------- 1 userB staff 53K Jul 6 14:42 /home/userB/.mysql_history
This may be a simple thing that others just knew off the bat, but we wanted to document it here as our Google-Fu didn't reveal anyone else dealing with this type of issue.