Here are seven ways to check what version of MySQL you’re running.
MySQL
MySQL VERSION() Explained
In MySQL, VERSION() is a built-in function that returns the MySQL server version.
The result is a string that uses the utf8mb3 character set. A suffix may also be appended to the version number indicating server build or configuration information.
MySQL Date Format Specifiers (Full List)
The following table contains a full list of format specifiers that can be used in format strings with functions like DATE_FORMAT(), STR_TO_DATE(), and FROM_UNIXTIME() in MySQL.
How to Set Up Named Time Zones in MySQL
If you want to use named time zones in MySQL, you’ll need to make sure they’ve been configured.
By “named time zones”, I mean being able to use strings like US/Eastern instead of −04:00 or −05:00 when specifying the time zone. For example, when using the CONVERT_TZ() function.
Here’s how to configure named time zones in MySQL.
Fix ERROR 1045: “Access denied for user…” in MySQL
If you’re getting error 1045 that reads something like “Access denied for user ‘root’@’localhost’“, it’s because you’re trying to log in to MySQL without the right credentials.
This usually happens when we provide the wrong password. But there could also be another cause. For example, we could be trying to do something as the root user that requires a password, but the root user hasn’t yet had its password set.
To fix this issue, be sure to provide the correct password when connecting to MySQL.
MySQL CURRENT_USER() Explained
In MySQL, CURRENT_USER() is a built-in function that returns the user name and host name combination for the MySQL account that the server used to authenticate the current client.
MySQL USER() Explained
In MySQL, USER() is a built-in function that returns the current MySQL user name and host name, given when connecting to MySQL.
The result is returned as a string in the utf8mb3 character set.
The value returned by USER() could be different to the value returned by CURRENT_USER().