Как узнать какая версия mysql установлена windows

MySQL - это чрезвычайно популярная СУБД с открытым исходным кодом, которая широко используется миллионами компаний и профессионалов. В этой статье вы

MySQL — это чрезвычайно популярная СУБД с открытым исходным кодом, которая широко используется миллионами компаний и профессионалов. В этой статье вы узнаете, как проверить текущую версию MySQL и как обновить ее в случае необходимости.

Mysql

Содержание

  1. Зачем вам нужно знать версию MySQL?
  2. Как проверить версию MySQL в терминале Windows
  3. Как узнать версию MySQL из клиента командной строки
  4. С помощью select
  5. Запрос MySQL SHOW VARIABLES LIKE
  6. Команда MySQL SELECT VERSION
  7. Команда MySQL STATUS
  8. Как проверить версию MySQL в XAMPP
  9. Как найти последнюю версию MySQL
  10. Как обновить версию MySQL

Зачем вам нужно знать версию MySQL?

В некоторых ситуациях очень важно знать текущую версию MySQL, поскольку определенные функции могут быть несовместимы с вашей системой. Кроме того, установка лучшей версии MySQL снижает риск краха вашей системы. Получение новой версии также означает новые функции и лучшие возможности для вашей системы. Итак, давайте посмотрим, как проверить, установлена ли на вашем сервере MySQL последняя версия, и как обновить ее, если это не так.

Как проверить версию MySQL в терминале Windows

Один из самых простых способов проверить версию вашего локального сервера MySQL из командной строки в Windows — использовать следующую команду, которая работает не только в Windows, но и в MAC, Linux и Ubuntu:

Как узнать версию MySQL из клиента командной строки

Просто откройте клиент MySQL, и информация о текущей версии MySQL будет сразу же доступна.

Как узнать версию MySQL из клиента командной строки

С помощью select

Введите следующую команду, чтобы получить информацию о текущей версии:

Запрос MySQL SHOW VARIABLES LIKE

Другой способ показать информацию о версии MySQL — с помощью оператора SHOW VARIABLES LIKE. В клиенте командной строки MySQL введите следующую команду:

SHOW VARIABLES LIKE 'version';

Команда MySQL SELECT VERSION

Клиент MySQL позволяет получить информацию о версии путем выполнения команды SELECT VERSION() в базе данных MySQL. Вот синтаксис запроса MySQL SELECT VERSION:

Не забывайте использовать точку с запятой в качестве разделителя операторов при работе с MySQL Client.

Команда MySQL STATUS

Вы также можете просмотреть текущую версию MySQL с помощью команды STATUS:

Вывод включает информацию о комментарии версии, которая помогает проверить состояние версии MySQL, например, время работы, потоки и многое другое.

Как проверить версию MySQL в XAMPP

Чтобы проверить версию MySQL в XAMPP, откройте командную строку Windows, перейдите в папку, где установлен XAMPP, и выполните следующую команду:

Другой способ проверить текущую версию MySQL в XAMPP заключается в следующем. Перейдите к файлу readme_en.txt, который находится в папке установки XAMPP. Там вы увидите номер версии MySQL.

Как найти последнюю версию MySQL

После того, как вы узнали свою версию MySQL, у вас неизбежно возникнет вопрос: какова последняя версия MySQL? В настоящее время последней стабильной версией MySQL является 8.0.

Чтобы убедиться, что ваша база данных работает на последней версии MySQL, вы можете следить за сообществом MSQL, где вы можете загрузить новую версию из списка последних версий. История версий MySQL действительно богата, и каждый новый релиз дает пользователям больше возможностей для более быстрой и эффективной работы.

Как обновить версию MySQL

Проверив текущую версию MySQL, вы можете обнаружить, что она не самая последняя. В этом случае вам необходимо обновить версию MySQL, следуя нашим простым инструкциям.

Если у вас более поздние версии MySQL, это может сэкономить ваше время, поскольку они обновляются автоматически. В этом случае вам не нужно ничего делать. Если вы намерены взять процесс под свой контроль и сделать все вручную, вы можете следовать нашим простым инструкциям. Перед началом работы не забудьте сделать резервную копию базы данных MySQL, чтобы быть уверенным в сохранности ваших данных.

Обновите версию MySQL с помощью командной строки так же, как вы это делали при проверке текущей версии MySQL.

mysql_upgrade -u root -p -force

Клиент mysql_upgrade теперь устарел. Действия, выполняемые клиентом обновления, теперь выполняются сервером.

2. Обновление версии MySQL с помощью cPanel дает вам более глубокий root-доступ, так как он поставляется с Web Host Manager. Чтобы обновить текущую версию MySQL, войдите в WHM и перейдите в Software > MySQL Upgrade. Выберите версию MySQL, которую вы хотите обновить, и нажмите Далее.

3. Чтобы обновить версию MySQL на Linux/Ubuntu, используйте учетные данные SSH и в репозитории MySQL APT Repository выполните следующую команду:

Список пакетов будет обновлен. Затем обновите MySQL, используя либо

sudo apt-get upgrade mysql-server

или

sudo apt-get install mysql-server

What command returns the current version of a MySQL database?

Yevgeniy Afanasyev's user avatar

asked Jan 24, 2012 at 13:33

pheromix's user avatar

1

Try this function —

SELECT VERSION();
-> '5.7.22-standard'

VERSION()

Or for more details use :

SHOW VARIABLES LIKE "%version%";
+-------------------------+------------------------------------------+
| Variable_name           | Value                                    |
+-------------------------+------------------------------------------+
| protocol_version        | 10                                       |
| version                 | 5.0.27-standard                          |
| version_comment         | MySQL Community Edition - Standard (GPL) |
| version_compile_machine | i686                                     |
| version_compile_os      | pc-linux-gnu                             |
+-------------------------+------------------------------------------+
5 rows in set (0.04 sec)

MySQL 5.0 Reference Manual (pdf) — Determining Your Current MySQL Version — page 42

Nolwennig's user avatar

Nolwennig

1,56323 silver badges29 bronze badges

answered Jan 24, 2012 at 13:35

Devart's user avatar

DevartDevart

118k22 gold badges162 silver badges184 bronze badges

4

Many answers suggest to use mysql --version. But the mysql programm is the client. The server is mysqld. So the command should be

mysqld --version

or

mysqld --help

That works for me on Debian and Windows.

When connected to a MySQL server with a client you can use

select version()

or

select @@version

answered Mar 7, 2019 at 13:46

Paul Spiegel's user avatar

Paul SpiegelPaul Spiegel

30.5k5 gold badges44 silver badges53 bronze badges

try

mysql --version

for instance. Or dpkg -l 'mysql-server*'.

answered Jan 24, 2012 at 13:35

Michael Krelin - hacker's user avatar

9

Use mysql -V works fine for me on Ubuntu.

Nolwennig's user avatar

Nolwennig

1,56323 silver badges29 bronze badges

answered Jun 6, 2016 at 1:57

Umesh Kaushik's user avatar

Umesh KaushikUmesh Kaushik

1,5011 gold badge16 silver badges18 bronze badges

1

Mysql Client version : Please beware this doesn’t returns server version, this gives mysql client utility version

mysql -version 

Mysql server version : There are many ways to find

  1. SELECT version();

enter image description here

  1. SHOW VARIABLES LIKE "%version%";

enter image description here

  1. mysqld --version

answered Aug 31, 2018 at 9:34

Amitesh Bharti's user avatar

Amitesh BhartiAmitesh Bharti

13k6 gold badges60 silver badges59 bronze badges

6

SHOW VARIABLES LIKE "%version%";
+-------------------------+------------------------------------------+
| Variable_name           | Value                                    |
+-------------------------+------------------------------------------+
| protocol_version        | 10                                       |
| version                 | 5.0.27-standard                          |
| version_comment         | MySQL Community Edition - Standard (GPL) |
| version_compile_machine | i686                                     |
| version_compile_os      | pc-linux-gnu                             |
+-------------------------+------------------------------------------+
5 rows in set (0.04 sec)

MySQL 5.0 Reference Manual (pdf) — Determining Your Current MySQL Version — page 42

Nolwennig's user avatar

Nolwennig

1,56323 silver badges29 bronze badges

answered Jan 24, 2012 at 13:37

John Woo's user avatar

John WooJohn Woo

255k69 gold badges492 silver badges488 bronze badges

0

Go to MySQL workbench and log to the server. There is a field called Server Status under MANAGEMENT. Click on Server Status and find out the version.
enter image description here

Or else go to following location and open cmd -> C:WindowsSystem32cmd.exe. Then hit the command -> mysql -V

enter image description here

answered Nov 3, 2020 at 10:59

Sandun Susantha's user avatar

1

Simply login to the Mysql with

mysql -u root -p

Then type in this command

select @@version;

This will give the result as,

+-------------------------+
| @@version               |
+-------------------------+
| 5.7.16-0ubuntu0.16.04.1 |
+-------------------------+
1 row in set (0.00 sec)

answered Dec 28, 2016 at 6:13

Nirojan Selvanathan's user avatar

I found a easy way to get that.

Example: Unix command(this way you don’t need 2 commands.),

$ mysql -u root -p -e 'SHOW VARIABLES LIKE "%version%";'

Sample outputs:

+-------------------------+-------------------------+
| Variable_name           | Value                   |
+-------------------------+-------------------------+
| innodb_version          | 5.5.49                  |
| protocol_version        | 10                      |
| slave_type_conversions  |                         |
| version                 | 5.5.49-0ubuntu0.14.04.1 |
| version_comment         | (Ubuntu)                |
| version_compile_machine | x86_64                  |
| version_compile_os      | debian-linux-gnu        |
+-------------------------+-------------------------+

In above case mysql version is 5.5.49.

Please find this useful reference.

answered Jun 30, 2016 at 7:18

tk_'s user avatar

tk_tk_

15.8k8 gold badges80 silver badges89 bronze badges

For UBUNTU you can try the following command to check mysql version :

mysql --version

Denim Datta's user avatar

Denim Datta

3,7303 gold badges26 silver badges53 bronze badges

answered Dec 5, 2013 at 8:30

Muhammad waqas muneer's user avatar

2

MySQL Server version

shell> mysqld --version

MySQL Client version

shell> mysql --version

shell> mysql -V 

answered Jan 13, 2014 at 7:20

Nanhe Kumar's user avatar

Nanhe KumarNanhe Kumar

15.1k5 gold badges78 silver badges70 bronze badges

2

mysqladmin version OR mysqladmin -V

ptierno's user avatar

ptierno

9,3042 gold badges22 silver badges35 bronze badges

answered Oct 28, 2014 at 7:22

Singh Anuj's user avatar

Singh AnujSingh Anuj

991 silver badge1 bronze badge

2

From the console you can try:

mysqladmin version -u USER -p PASSWD

GDP's user avatar

GDP

7,9916 gold badges44 silver badges81 bronze badges

answered Jan 24, 2012 at 13:37

spike's user avatar

spikespike

894 bronze badges

For Mac,

  1. login to mysql server.

  2. execute the following command:

     SHOW VARIABLES LIKE "%version%";
    

answered Aug 9, 2018 at 7:39

KayV's user avatar

KayVKayV

12.4k10 gold badges94 silver badges139 bronze badges

2

With CLI in one line :

mysql --user=root --password=pass --host=localhost db_name --execute='select version()';

or

mysql -uroot -ppass -hlocalhost db_name -e 'select version()';

return something like this :

+-----------+
| version() |
+-----------+
| 5.6.34    |
+-----------+

answered Apr 11, 2017 at 14:39

Nolwennig's user avatar

NolwennigNolwennig

1,56323 silver badges29 bronze badges

You can also look at the top of the MySQL shell when you first log in. It actually shows the version right there.

Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 67971
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql>

answered Dec 23, 2016 at 20:24

David Duggins's user avatar

E:>mysql -u root -p
Enter password: *******
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1026
Server version: 5.6.34-log MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> select @@version;
+------------+
| @@version  |
+------------+
| 5.6.34-log |
+------------+
1 row in set (0.00 sec)

Marco Bonelli's user avatar

Marco Bonelli

60.8k20 gold badges119 silver badges123 bronze badges

answered Apr 19, 2017 at 10:12

Abhay Singh's user avatar

2

Xampp with Windows users below in the command whihc worked in the mysql directory.
enter image description here

answered Apr 19, 2021 at 6:50

Amol Bhandari SJ's user avatar

In windows ,open Command Prompt and type MySQL -V or MySQL --version. If you use Linux get terminal and type MySQL -v

Chaminda Bandara's user avatar

answered Aug 18, 2018 at 15:23

Manjitha Teshara's user avatar

2

Sometimes it is important to know which version of MySQL candidate is available to installed by default. here is the little command to check that prior to actually installing.

sudo apt-cache policy mysql-server

This is more important for any existing project which might be running on old MySQL Versions e.g. 5.7.

A sample output of the above command could be:

mysql-server: Installed: (none) Candidate:
8.0.29-0ubuntu0.20.04.3 Version table:
8.0.29-0ubuntu0.20.04.3 500

500 http://mirrors.digitalocean.com/ubuntu focal-updates/main amd64
Packages 500 http://security.ubuntu.com/ubuntu focal-security/main
amd64 Packages
8.0.19-0ubuntu5 500

500 http://mirrors.digitalocean.com/ubuntu focal/main amd64 Packages

This states that by default by running the following command some flavour of MySQL Server 8 will be installed.

sudo apt install mysql-server

answered May 7, 2022 at 20:52

Dibyendu Mitra Roy's user avatar

Print a Dockerized MariaDB/MySQL Server version:

When I backup a WordPress site- in this case containerized— I capture the WordPress version in the filename as well as the DB version that was current at the time of the backup. This ensures that if I ever needed to restore, I wouldn’t have a compatibility nightmare figuring out what version DB works with a specified version of the WordPress backup.

So I include the DB server version in the dump name. I loaded the below into a self-populating variable:

docker exec -it ContainerIdOfDB mysqld --version | awk '{print $3}' | cut -d'-' -f1

This pukes out the current DB version without having to login to retrieve it.

answered Jul 28, 2022 at 0:10

F1Linux's user avatar

F1LinuxF1Linux

3,2243 gold badges21 silver badges22 bronze badges

Here two more methods:

Linux: Mysql view version: from PHP

From a PHP function, we can see the version used:

mysql_get_server_info ([resource $ link_identifier = NULL]): string

Linux: Mysql view version: Package version

For RedHat / CentOS operating systems:

rpm -qa | grep mysql

For Debian / Ubuntu operating systems:

rpm -qa | grep mysql

Extracted from: https://www.sysadmit.com/2019/03/linux-mysql-ver-version.html

answered Mar 10, 2019 at 10:32

John Elvial's user avatar

Only this code works for me

/usr/local/mysql/bin/mysql -V  

answered Nov 16, 2019 at 4:25

Kuhan's user avatar

KuhanKuhan

4757 silver badges17 bronze badges

1

Your database more than likely runs on MySQL or its fully open-source fork MariaDB. These popular database management software power 90% of websites, so your server host has probably installed either of them for you.

But not all hosts will continue to keep it up to date, so it’s often up to you to check your MySQL version and keep it upgraded. Outdated software on your server is never good and can also be harmful.

Let’s learn how to check if your MySQL version is up to date, and upgrade it if it isn’t.

Watch Our Video Guide to Checking and Upgrading Your MySQL Version

Why Keep MySQL Up to Date?

Manual server maintenance is not a fun task, especially if you’re not very familiar with your webserver’s inner workings. As long as your server and database are working fine, it may be tempting to ignore an outdated piece of software. But there are quite a few reasons why this is a bad idea.

It’s never good to have outdated software on your server. Even the tiniest hole in your security could be a vector for attackers to slip through and take over.

They may even be able to mess with your database. All sorts of important info are stored there, such as your WordPress posts and all other kinds of sensitive bits. You don’t want anyone unwanted to be able to modify that.

Besides that, a new version means new features and general improvements for what’s already there. Even if these extra features don’t affect you, more recent MySQL versions are more secure, better optimized, and faster.

What's new in MySQL 8.0.

What’s new in MySQL 8.0.

And with every update of MySQL comes a whole slew of bug fixes, patching up errors that could be an annoyance at best or cause you serious trouble at worst.

When it comes to any software on your website, it’s almost always best to keep it at the latest version.

MySQL runs in the background of 90% of websites 😲… but not all hosts will continue to keep it updated. Learn how to check for yourself right here ⬇️Click to Tweet

Which Version of MySQL is the Best?

Many servers these days are still running on MySQL 5.7 (the latest version before the jump to 8.0), even though a newer and better version exists. Why is this? And which is best, MySQL 5.7 or 8.0?

Most people don’t upgrade because either they don’t know about the latest MySQL version, or they don’t want to take the time to update it. In addition, 5.7 has not been deprecated and will not be until 2023.

Support EOL for macOS v10.14

Support EOL for macOS v10.14

But while MySQL 5.7 is still supported, making the switch to the latest version is definitely worth your time. It’s faster and more secure — changes can be observed instantly upon activating it. And for developers who can make use of the new functions, the benefits are more numerous than can be quickly listed.

There are some upgrade considerations and backward incompatibilities you’ll need to know about, but for a majority of sites, they won’t cause issues.

It’s almost always best to keep up with the latest stable version of MySQL. Even minor updates are worth the trouble, though the new built-in auto-updater will likely handle those for you. As for major updates, it’s worth it unless crucial parts of your server are incompatible.

While WordPress supports MySQL versions all the way back to 5.6, 8.0 works perfectly with it. And as 5.6 is no longer supported and is susceptible to bugs and security risks, you should at least update to 5.7.

How to Check MySQL Version

It’s crucial to keep MySQL up to date, but you need to know its version before upgrading. Chances are, you’re already using the latest version and don’t need to do anything at all. There are several ways to check; these are just a handful of the easiest ones.

Check MySQL Version with MyKinsta

Accessing your database and checking your MySQL version with MyKinsta is very easy. There are several ways to do so, as detailed above, but the easiest two are using phpMyAdmin or connecting with the command line.

You can find phpMyAdmin after logging into MyKinsta. Just go to Sites > Info, and under the Database access section, click Open phpMyAdmin. The credentials you need to log in are right there.

You can also connect with the command line with SSH. With Kinsta, we set up everything for you to allow SSH access. Just find your credentials in Sites > Info in the SFTP/SSH section. Then follow the steps below to log in and put in the proper commands.

Use the Command Line

The easiest way to obtain your MySQL version is with a simple code submitted through the command line. It takes mere seconds and answers your question instantly. Getting at your server’s command line shouldn’t be too difficult unless you’re using minimal hosting.

There are a variety of ways to access your server’s command line. For example, your web host may provide a way to submit commands through their back end, such as with cPanel. Or you may be able to use the built-in Terminal or Command Prompt to connect to your server. Tools like PuTTY also exist to help you log in and are usually required for Windows users to connect with SSH.

Either way, you’ll need some SSH login credentials. You can usually find them in your web hosting dashboard, or you can email them and ask for help.

Once you know how you’re going to connect to your server’s command line, follow these steps.

Step 1: Launch the Terminal (Linux, macOS) or Command Prompt/PuTTY (Windows) on your computer. In cPanel, you can find it under Advanced > Terminal.

cPanel Terminal view

cPanel Terminal view

Step 2: Provide your SSH credentials to connect and log in to the server.

Step 3: Input the following command:

mysql -V

If you have the MySQL Shell installed, you can also use the simple command “mysql” to show your version information.

Either way, the version number should be output on the screen.

Check MySQL Version with phpMyAdmin

There’s another straightforward way to check your MySQL version, and that’s with phpMyAdmin. This software is also ubiquitous and present on most servers, so you have a good shot at finding your MySQL version.

Find your phpMyAdmin credentials by checking your web hosting dashboard. There may even be a direct link to log in there. Email your host if you can’t find them.

Log in to phpMyAdmin once you find your credentials. As soon as you’re in, you’ll see a Database server box on the right side of the screen. There, under the Software version section, is your MySQL version. Easy as that!

Viewing MySQL version in phpMyAdmin

Viewing MySQL version in phpMyAdmin

Through WordPress Dashboard

A final easy way to find your MySQL version is through your site’s WordPress admin dashboard.

To do that, visit your WordPress dashboard, and go to Tools > Site Health. Under here, first, go to the Info tab, and then to the Database section below.

You can find your server’s current MySQL version listed here beside the Server version label.

Finding the MySQL version in WordPress dashboard.

Finding the MySQL version in WordPress dashboard.

How to Upgrade MySQL Version

If you’ve determined your MySQL is out of date, you should rectify that as soon as possible. There are multiple ways to update MySQL to the latest versions; it all depends on what tools and operating systems you’re using.

It’s worth noting that later versions of MySQL will attempt to auto-update if the script notices that your installation is out of date. You may not need to do anything at all. If you’ve determined that MySQL is out of date and needs to be manually updated, follow these steps.

Like checking your MySQL version with the command line, you’ll need to obtain your SSH login credentials from your web host to access the terminal on your server. And, of course, you’ll need the IP address of your server.

This backup contains both your database (an SQL file) and your entire site, so you’ll be extra safe if something goes wrong.

Upgrade MySQL Using cPanel

If your host offers cPanel, it’s probably the easiest way to do an upgrade since you can use the interface provided. But since cPanel defaults to MySQL 5.7 by default, you may want to do an upgrade.

As cPanel doesn’t allow you to downgrade, you should back up your database before proceeding.

Most cPanel installations come with Web Host Manager, WHM, which gives you deeper root access.

Step 1: Log in to WHM by visiting either “example-site.com:2087” or “example-site.com/whm.” You can also ask your web host how to access WHM.

Step 2: Navigate to Software > MySQL Upgrade or type “MySQL” into the search bar. You may also find it under SQL Services > MySQL/MariaDB Upgrade.

Step 3: Select the version of MySQL you want to upgrade to and click Next. Now follow the upgrade steps, and it’ll take care of everything for you.

Web Host Manager cPanel MySQL update 

Web Host Manager cPanel MySQL update

This method is by far the simplest way to do a MySQL upgrade, but if your host doesn’t offer cPanel or WHM, you may need to do it manually.

Upgrade MySQL in Linux/Ubuntu

There are a variety of Linux distributions, but Ubuntu is by far the most common. These instructions should work for any operating system that uses the apt/apt-get function to install the software.

MySQL APT Repository

MySQL APT Repository

Linux can easily SSH connect without any additional software requirements. So, you can get right into your server.

Step 1: Launch the Terminal. Obtain your SSH credentials and use the ssh command to log in.

Step 2: You should have the MySQL apt Repository installed since MySQL is already on your server. Update your package list with the following command:

sudo apt-get update

Step 3: Now upgrade MySQL.

sudo apt-get upgrade mysql-server

You can also try this command if the above doesn’t work:

sudo apt-get install mysql-server

It’ll prompt you to choose a version; select 5.7 or 8.0. If you’re upgrading from 5.6, you should update to 5.7 first, rather than going straight to 8.0.

Upgrade MySQL on macOS

While macOS comes with its own version of MySQL, you can’t upgrade it through the usual methods. And most likely, your server is using a separate instance.

Many of these steps are very similar to updating MySQL on Linux. macOS similarly has SSH built into the operating system, so all you need to do is run the commands.

We’ll assume you’re using Homebrew as a package manager as it’s the simplest way to install and update MySQL on Mac. You shouldn’t attempt to upgrade MySQL with Homebrew if you didn’t use it to install it initially.

Using Homebrew to install MySQL on Mac

Using Homebrew to install MySQL on Mac

Step 1: Launch the Terminal program and log in with the ssh command.

Step 2: Run these commands using Homebrew.

brew update
brew install mysql

This command should automatically install 8.0 and upgrade any existing versions.

Are you running into trouble? Try uninstalling the current version of MySQL first. Use these commands:

brew remove mysql
brew cleanup

Then you can again attempt to run the update and install commands again.

Step 3: Make sure you start the MySQL server again manually:

mysql.server start

Upgrade MySQL in Windows

Unlike Mac and Linux, Windows can’t use SSH by default. Instead, you’ll need to install a separate client, and then you can connect to your server.

Step 1: Download PuTTY and install it on your system. Launch it and input your SSH credentials to connect to the server. 3306 is the default port number. Ignore any security alerts; these are normal.

Step 2: Assuming you’re connecting to a Linux terminal, you can use the Linux commands in the Linux/Ubuntu section above to perform the upgrade.

You can also use the MySQL installer to download MySQL onto the system directly. This process skips the SSH connection entirely.

Keeping your MySQL version up to date is crucial for site security 🔒 See how to upgrade your version here ⬇️Click to Tweet

Summary

With any software, it’s crucial to keep it up to date. And with MySQL being so integral to your website and its database, it’s even more imperative. Unfortunately, too many web admins choose to let their MySQL version fall behind, to the detriment of their website’s speed and security.

Luckily, checking your MySQL version and upgrading it is almost always a smooth process. While you should definitely back up your website and database for emergencies, you aren’t likely to experience any issues.

With just a tiny command in your web server’s terminal, your database will be well optimized and faster than ever.


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Your database more than likely runs on MySQL or its fully open-source fork MariaDB. These popular database management software power 90% of websites, so your server host has probably installed either of them for you.

But not all hosts will continue to keep it up to date, so it’s often up to you to check your MySQL version and keep it upgraded. Outdated software on your server is never good and can also be harmful.

Let’s learn how to check if your MySQL version is up to date, and upgrade it if it isn’t.

Watch Our Video Guide to Checking and Upgrading Your MySQL Version

Why Keep MySQL Up to Date?

Manual server maintenance is not a fun task, especially if you’re not very familiar with your webserver’s inner workings. As long as your server and database are working fine, it may be tempting to ignore an outdated piece of software. But there are quite a few reasons why this is a bad idea.

It’s never good to have outdated software on your server. Even the tiniest hole in your security could be a vector for attackers to slip through and take over.

They may even be able to mess with your database. All sorts of important info are stored there, such as your WordPress posts and all other kinds of sensitive bits. You don’t want anyone unwanted to be able to modify that.

Besides that, a new version means new features and general improvements for what’s already there. Even if these extra features don’t affect you, more recent MySQL versions are more secure, better optimized, and faster.

What's new in MySQL 8.0.

What’s new in MySQL 8.0.

And with every update of MySQL comes a whole slew of bug fixes, patching up errors that could be an annoyance at best or cause you serious trouble at worst.

When it comes to any software on your website, it’s almost always best to keep it at the latest version.

MySQL runs in the background of 90% of websites 😲… but not all hosts will continue to keep it updated. Learn how to check for yourself right here ⬇️Click to Tweet

Which Version of MySQL is the Best?

Many servers these days are still running on MySQL 5.7 (the latest version before the jump to 8.0), even though a newer and better version exists. Why is this? And which is best, MySQL 5.7 or 8.0?

Most people don’t upgrade because either they don’t know about the latest MySQL version, or they don’t want to take the time to update it. In addition, 5.7 has not been deprecated and will not be until 2023.

Support EOL for macOS v10.14

Support EOL for macOS v10.14

But while MySQL 5.7 is still supported, making the switch to the latest version is definitely worth your time. It’s faster and more secure — changes can be observed instantly upon activating it. And for developers who can make use of the new functions, the benefits are more numerous than can be quickly listed.

There are some upgrade considerations and backward incompatibilities you’ll need to know about, but for a majority of sites, they won’t cause issues.

It’s almost always best to keep up with the latest stable version of MySQL. Even minor updates are worth the trouble, though the new built-in auto-updater will likely handle those for you. As for major updates, it’s worth it unless crucial parts of your server are incompatible.

While WordPress supports MySQL versions all the way back to 5.6, 8.0 works perfectly with it. And as 5.6 is no longer supported and is susceptible to bugs and security risks, you should at least update to 5.7.

How to Check MySQL Version

It’s crucial to keep MySQL up to date, but you need to know its version before upgrading. Chances are, you’re already using the latest version and don’t need to do anything at all. There are several ways to check; these are just a handful of the easiest ones.

Check MySQL Version with MyKinsta

Accessing your database and checking your MySQL version with MyKinsta is very easy. There are several ways to do so, as detailed above, but the easiest two are using phpMyAdmin or connecting with the command line.

You can find phpMyAdmin after logging into MyKinsta. Just go to Sites > Info, and under the Database access section, click Open phpMyAdmin. The credentials you need to log in are right there.

You can also connect with the command line with SSH. With Kinsta, we set up everything for you to allow SSH access. Just find your credentials in Sites > Info in the SFTP/SSH section. Then follow the steps below to log in and put in the proper commands.

Use the Command Line

The easiest way to obtain your MySQL version is with a simple code submitted through the command line. It takes mere seconds and answers your question instantly. Getting at your server’s command line shouldn’t be too difficult unless you’re using minimal hosting.

There are a variety of ways to access your server’s command line. For example, your web host may provide a way to submit commands through their back end, such as with cPanel. Or you may be able to use the built-in Terminal or Command Prompt to connect to your server. Tools like PuTTY also exist to help you log in and are usually required for Windows users to connect with SSH.

Either way, you’ll need some SSH login credentials. You can usually find them in your web hosting dashboard, or you can email them and ask for help.

Once you know how you’re going to connect to your server’s command line, follow these steps.

Step 1: Launch the Terminal (Linux, macOS) or Command Prompt/PuTTY (Windows) on your computer. In cPanel, you can find it under Advanced > Terminal.

cPanel Terminal view

cPanel Terminal view

Step 2: Provide your SSH credentials to connect and log in to the server.

Step 3: Input the following command:

mysql -V

If you have the MySQL Shell installed, you can also use the simple command “mysql” to show your version information.

Either way, the version number should be output on the screen.

Check MySQL Version with phpMyAdmin

There’s another straightforward way to check your MySQL version, and that’s with phpMyAdmin. This software is also ubiquitous and present on most servers, so you have a good shot at finding your MySQL version.

Find your phpMyAdmin credentials by checking your web hosting dashboard. There may even be a direct link to log in there. Email your host if you can’t find them.

Log in to phpMyAdmin once you find your credentials. As soon as you’re in, you’ll see a Database server box on the right side of the screen. There, under the Software version section, is your MySQL version. Easy as that!

Viewing MySQL version in phpMyAdmin

Viewing MySQL version in phpMyAdmin

Through WordPress Dashboard

A final easy way to find your MySQL version is through your site’s WordPress admin dashboard.

To do that, visit your WordPress dashboard, and go to Tools > Site Health. Under here, first, go to the Info tab, and then to the Database section below.

You can find your server’s current MySQL version listed here beside the Server version label.

Finding the MySQL version in WordPress dashboard.

Finding the MySQL version in WordPress dashboard.

How to Upgrade MySQL Version

If you’ve determined your MySQL is out of date, you should rectify that as soon as possible. There are multiple ways to update MySQL to the latest versions; it all depends on what tools and operating systems you’re using.

It’s worth noting that later versions of MySQL will attempt to auto-update if the script notices that your installation is out of date. You may not need to do anything at all. If you’ve determined that MySQL is out of date and needs to be manually updated, follow these steps.

Like checking your MySQL version with the command line, you’ll need to obtain your SSH login credentials from your web host to access the terminal on your server. And, of course, you’ll need the IP address of your server.

This backup contains both your database (an SQL file) and your entire site, so you’ll be extra safe if something goes wrong.

Upgrade MySQL Using cPanel

If your host offers cPanel, it’s probably the easiest way to do an upgrade since you can use the interface provided. But since cPanel defaults to MySQL 5.7 by default, you may want to do an upgrade.

As cPanel doesn’t allow you to downgrade, you should back up your database before proceeding.

Most cPanel installations come with Web Host Manager, WHM, which gives you deeper root access.

Step 1: Log in to WHM by visiting either “example-site.com:2087” or “example-site.com/whm.” You can also ask your web host how to access WHM.

Step 2: Navigate to Software > MySQL Upgrade or type “MySQL” into the search bar. You may also find it under SQL Services > MySQL/MariaDB Upgrade.

Step 3: Select the version of MySQL you want to upgrade to and click Next. Now follow the upgrade steps, and it’ll take care of everything for you.

Web Host Manager cPanel MySQL update 

Web Host Manager cPanel MySQL update

This method is by far the simplest way to do a MySQL upgrade, but if your host doesn’t offer cPanel or WHM, you may need to do it manually.

Upgrade MySQL in Linux/Ubuntu

There are a variety of Linux distributions, but Ubuntu is by far the most common. These instructions should work for any operating system that uses the apt/apt-get function to install the software.

MySQL APT Repository

MySQL APT Repository

Linux can easily SSH connect without any additional software requirements. So, you can get right into your server.

Step 1: Launch the Terminal. Obtain your SSH credentials and use the ssh command to log in.

Step 2: You should have the MySQL apt Repository installed since MySQL is already on your server. Update your package list with the following command:

sudo apt-get update

Step 3: Now upgrade MySQL.

sudo apt-get upgrade mysql-server

You can also try this command if the above doesn’t work:

sudo apt-get install mysql-server

It’ll prompt you to choose a version; select 5.7 or 8.0. If you’re upgrading from 5.6, you should update to 5.7 first, rather than going straight to 8.0.

Upgrade MySQL on macOS

While macOS comes with its own version of MySQL, you can’t upgrade it through the usual methods. And most likely, your server is using a separate instance.

Many of these steps are very similar to updating MySQL on Linux. macOS similarly has SSH built into the operating system, so all you need to do is run the commands.

We’ll assume you’re using Homebrew as a package manager as it’s the simplest way to install and update MySQL on Mac. You shouldn’t attempt to upgrade MySQL with Homebrew if you didn’t use it to install it initially.

Using Homebrew to install MySQL on Mac

Using Homebrew to install MySQL on Mac

Step 1: Launch the Terminal program and log in with the ssh command.

Step 2: Run these commands using Homebrew.

brew update
brew install mysql

This command should automatically install 8.0 and upgrade any existing versions.

Are you running into trouble? Try uninstalling the current version of MySQL first. Use these commands:

brew remove mysql
brew cleanup

Then you can again attempt to run the update and install commands again.

Step 3: Make sure you start the MySQL server again manually:

mysql.server start

Upgrade MySQL in Windows

Unlike Mac and Linux, Windows can’t use SSH by default. Instead, you’ll need to install a separate client, and then you can connect to your server.

Step 1: Download PuTTY and install it on your system. Launch it and input your SSH credentials to connect to the server. 3306 is the default port number. Ignore any security alerts; these are normal.

Step 2: Assuming you’re connecting to a Linux terminal, you can use the Linux commands in the Linux/Ubuntu section above to perform the upgrade.

You can also use the MySQL installer to download MySQL onto the system directly. This process skips the SSH connection entirely.

Keeping your MySQL version up to date is crucial for site security 🔒 See how to upgrade your version here ⬇️Click to Tweet

Summary

With any software, it’s crucial to keep it up to date. And with MySQL being so integral to your website and its database, it’s even more imperative. Unfortunately, too many web admins choose to let their MySQL version fall behind, to the detriment of their website’s speed and security.

Luckily, checking your MySQL version and upgrading it is almost always a smooth process. While you should definitely back up your website and database for emergencies, you aren’t likely to experience any issues.

With just a tiny command in your web server’s terminal, your database will be well optimized and faster than ever.


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Содержание

  1. Как проверить версию MySQL
  2. Из командной строки
  3. Из оболочки MySQL
  4. Использование PHP
  5. Выводы
  6. MySQL select version и как узнать версию MySQL
  7. Смена версии сервера баз данных на Debian
  8. Как проверить версию MySQL
  9. Из командной строки
  10. Из оболочки MySQL
  11. Используя PHP
  12. Заключение
  13. Как узнать версию Microsoft SQL Server на T-SQL
  14. Способы определения версии Microsoft SQL Server на T-SQL
  15. Способ 1 – функция @@VERSION
  16. Способ 2 – функция SERVERPROPERTY
  17. Способ 3 – хранимая процедура sys.xp_msver
  18. MySQL: проверьте, какая версия: 32 бит или 64 бит?
  19. 10 ответов

Как проверить версию MySQL

MySQL (и его заменитель MariaDB) — самая популярная система управления реляционными базами данных с открытым исходным кодом. Между версиями MySQL есть некоторые важные различия, поэтому в некоторых ситуациях может быть важно знать, какая версия работает на вашем сервере.

Например, если вы устанавливаете приложение, для которого требуется определенная версия MySQL, перед началом установки вам необходимо выяснить версию вашего сервера MySQL.

В этой статье мы покажем вам, как проверить версию сервера MySQL или MariaDB, установленную в вашей системе.

Из командной строки

Если у вас есть SSH-доступ к серверу, есть несколько различных команд, которые могут помочь вам определить версию вашего MySQL.

Команда выведет информацию о версии MySQL и завершит работу. В этом примере версия сервера MySQL — 5.7.27 :

mysqladmin — это клиентская утилита, которая используется для выполнения административных операций на серверах MySQL. Его также можно использовать для запроса версии MySQL:

Результат будет немного отличаться от предыдущей команды:

Из оболочки MySQL

Чтобы подключиться к серверу MySQL, просто введите mysql :

После подключения к оболочке MySQL версия будет напечатана на экране:

Чтобы получить информацию о версии MySQL и других компонентах, запросите переменные version :

Есть также некоторые другие операторы и команды, которые могут показать вам версию сервера. Оператор SELECT VERSION() отобразит только версию MySQL.

Команда STATUS показывает версию MySQL, а также информацию о статусе сервера:

Использование PHP

Если вы используете виртуальный хостинг и у вас нет доступа к командной строке или к клиенту MySQL, например PhpMyAdmin, вы можете определить версию сервера MySQL с помощью PHP.

Откройте файл в браузере, и версия сервера MySQL отобразится на вашем экране:

Выводы

Определение версии сервера MySQL — относительно простая задача. В этом руководстве мы показали несколько различных вариантов того, как найти версию MySQL, работающую в вашей системе.

Не стесняйтесь оставлять комментарии, если у вас есть вопросы.

Источник

MySQL select version и как узнать версию MySQL

Узнать версию можно несколькими способами. Самый простой не требует знать пароль пользователя сервера баз данных. Достаточно зайти по SSH и выполнить mysql —version

mysql Ver 14.14 Distrib 5.5.55, for debian-linux-gnu (x86_64) using readline 6.3

Чтобы использовать способ, приведенный в заголовке, нужно направить SQL запрос, для этого — авторизоваться в консоли (можно делать это и скриптом).

Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 41
Server version: 5.5.55-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

Необходимая информация имеется в выводе, который появляется после успешной авторизации. В данном случае используется MySQL Server версии 5.5.55-0.

Также оказавшись в консоли сервера баз данных можно запросить версию следующим образом:

+————————-+
| version() |
+————————-+
| 5.5.55-0ubuntu0.14.04.1 |
+————————-+
1 row in set (0.00 sec)

Во всех рассмотренных случаях получена одинаково полная информация.

Читайте цикл статей, описывающих основы работы с MySQL (вводный материал цикла).

Если скрипты сайта, работающие с базой, написаны под определенную версию ПО на сервере и используется не она, версию как и сам пакет можно сменить. Делается это в Debian довольно просто, ниже приведен алгоритм.

Смена версии сервера баз данных на Debian

1) с использованием утилиты mysqldump создается дамп всех таблиц (в том числе служебных)

2) пакет удаляется apt-get remove mysql-server* && apt-get purge mysql-server*, также нужно удалить /var/lib/mysql и /etc/mysql предварительно сделав копию

3) в /etc/apt/source.list добавляется репозиторий, приведенный на официальном сайте (например, для MariaDB 10 на Debian 8), информация обновляется apt-get update

3) также через apt-get ставится новый пакет после чего загружаются дампы баз

Копии всегда нужно иметь на случай непредвиденных ситуаций. Для разных версий используются разные директивы в конфигурационных файлах и может потребоваться ручная их правка.

Читайте про запрос SELECT, при помощи него была выведена версия пакета, именно выборка является самой частой операцией.

Источник

Как проверить версию MySQL

Kak proverit versiyu MySQL

Например, если вы устанавливаете приложение, для которого требуется определенная версия MySQL, прежде чем начинать установку, вам необходимо узнать версию вашего сервера MySQL.

В этой статье мы покажем вам, как проверить версию сервера MySQL или MariaDB, установленного в вашей системе.

Из командной строки

Если у вас есть SSH-доступ к серверу, есть несколько разных команд, которые могут помочь вам определить версию вашего MySQL.

Команда выведет информацию о версии MySQL и завершит работу. В этом примере версия сервера MySQL 5.7.27:

Клиентская утилита mysqladmin, которая используется для выполнения административных операций на серверах MySQL Он также может быть использован для запроса версии MySQL:

Вывод будет немного отличаться от предыдущей команды:

Из оболочки MySQL

Командная клиентская утилита, такая как mysql, также может быть использована для определения версии сервера MySQL.

Чтобы подключиться к серверу MySQL, просто наберите mysql:

После подключения к оболочке MySQL версия будет выведена на экран:

Чтобы получить информацию о версии MySQL и других компонентах, запросите переменные version:

Есть также некоторые другие операторы и команды, которые могут показать вам версию сервера. Оператор SELECT VERSION() будет отображать только версию MySQL.

Команда STATUS показывает версию MySQL, а также информацию о состоянии сервера:

Используя PHP

Если вы используете общий хостинг и у вас нет доступа к командной строке или клиенту MySQL, например PhpMyAdmin, вы можете определить версию сервера MySQL с помощью PHP.

Откройте файл в вашем браузере, и версия сервера MySQL будет отображаться на вашем экране:

Заключение

Определение версии сервера MySQL является относительно простой задачей. В этой статье мы показали несколько различных вариантов того, как найти версию MySQL, работающую в вашей системе.

Не стесняйтесь оставлять комментарии, если у вас есть какие-либо вопросы.

Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.

Источник

Как узнать версию Microsoft SQL Server на T-SQL

Приветствую Вас на сайте Info-Comp.ru! В этом материале рассмотрено несколько способов определения версии Microsoft SQL Server и других деталей сервера, с использованием языка T-SQL.

How to find out version Microsoft SQL Server 1

Способы определения версии Microsoft SQL Server на T-SQL

Существует несколько способов узнать, какая версия SQL Server используется. Мы рассмотрим способы, которые подразумевают выполнение определённых SQL инструкций, при этом каждый из этих способов будет выдавать Вам примерно одинаковый набор информации, поэтому Вы можете использовать тот способ, который будет Вам удобнее в Вашем конкретном случае.

Способ 1 – функция @@VERSION

Первый способ предполагает использование системной функции @@VERSION.

@@VERSION – системная функция конфигурации, она возвращает сведения об установленном Microsoft SQL Server.

Это, наверное, классический способ определения версии Microsoft SQL Server, который предполагает использование языка T-SQL.

Запрос с использованием этой функции выглядит очень просто

How to find out version Microsoft SQL Server 2

Способ 2 – функция SERVERPROPERTY

Использование предыдущего способа в некоторых случаях бывает не очень удобным, так как все данные возвращаются в виде единой строки. Дело в том, что может возникнуть необходимость программно определить и получить какие-то конкретные свойства SQL Server, например, номер версии SQL Server, или только номер сборки, может быть, редакцию SQL Server или другую информацию о сервере.

И если для этого использовать функцию @@VERSION, то придется выполнять дополнительные действия с извлечением соответствующей информации из строки, которую возвращает функция.

Поэтому в таких случаях использовать функцию @@VERSION не стоит, так как в SQL Server существует функция SERVERPROPERTY, которая возвращает конкретную информацию об экземпляре SQL Server.

SERVERPROPERTY – системная функция SQL Server для получения метаданных, она возвращает информацию о свойствах установленного экземпляра SQL Server.

Использовать функцию SERVERPROPERTY также очень просто, в нее необходимо передать один параметр – это название свойства, данные которого Вы хотите получить.

Например следующий запрос возвращает: редакцию SQL Server, уровень продукта и полный номер версии SQL Server.

How to find out version Microsoft SQL Server 3

Существуют следующие свойства, информацию о которых можно получить, используя функцию SERVERPROPERTY

Более подробно про все свойства можете почитать в официальной документации.

Способ 3 – хранимая процедура sys.xp_msver

Кроме перечисленных выше функций в Microsoft SQL Server существует еще и системная хранимая процедура sys.xp_msver, которая возвращает информацию о версии SQL Server.

sys.xp_msver – системная хранимая процедура, которая возвращает информацию о версии Microsoft SQL Server.

Иногда вызывать хранимую процедуру предпочтительней, чем посылать обычные SQL запросы, поэтому в SQL Server и существуют системные хранимые процедуры.

Чтобы посмотреть всю информацию, которую возвращает процедура sys.xp_msver, необходимо вызвать ее без параметров.

Чтобы получить конкретную информацию, необходимо в качестве параметра передать название свойства.

How to find out version Microsoft SQL Server 4

Доступны следующие свойства:

Заметка! Если Вас интересует язык SQL, то рекомендую почитать книгу «SQL код» это самоучитель по языку SQL для начинающих программистов. В ней язык SQL рассматривается как стандарт, чтобы после прочтения данной книги можно было работать с языком SQL в любой системе управления базами данных.

На сегодня это все, надеюсь, материал был Вам полезен, удачи!

Источник

MySQL: проверьте, какая версия: 32 бит или 64 бит?

могу ли я сказать, какую версию (32 бит или 64 бит) MySQL я запускаю с помощью терминала?

10 ответов

выполните эту команду в командной строке:

тогда получится что-то вроде этого:

вы увидите, что i386 / i686-32 бит, а x86_64-64 бит.

надеюсь, что это помогает.

можно использовать version() :

запуск клиента MySQL командной строки:

, который является псевдонимом для:

вы можете попробовать команду: (не требуется логин)

чтобы узнать свою битную архитектуру Mysql, выполните этот шаг. Откройте консоль Mysql из phpmyadmin

теперь после ввода пароля введите эту команду

показывать глобальные переменные, такие как ‘version_compile_machine’;

Если version_compile_machine = x86_64, то это 64 бит

Я искал это также (основные проблемы дампа, подключающиеся к mysql), и казалось, что ни один из вышеперечисленных ответов правильно не ответил на вопрос: например, информация о версии mysql не включает тип сборки 32 или 64 бит.

нашел этот capttofu: у меня есть 32-разрядный или 64-разрядный MySQL? captoflu который использует простую команду «Файл», чтобы сказать, какая сборка выполняется в моем случае.

использовать @@version переменной сервера.

Это Я сделать на моем сервере:

надеюсь, что это помогает.

получить версию mysql в Windows с пользовательским запросом:

получить версию mysql в Windows с переменной сервера:

получить версию mysql в Windows с s флаг.

Источник

Командная строка должна измениться на mysql>, чтобы вы знали, что вы находитесь в папке MySQL. Это список содержимого текущей папки. В одной из папок будет отображаться номер версии вашей установки MySQL. Например, если вы установили MySQL 5.5, вы должны увидеть папку с именем «MySQL Server 5.5».

  1. Важно знать, какую версию MySQL вы установили. …
  2. Самый простой способ найти версию MySQL — использовать команду mysql -V. …
  3. Клиент командной строки MySQL — это простая оболочка SQL с возможностью редактирования ввода.

Как мне найти версию MySQL?

Из оболочки MySQL

Командная клиентская утилита, такая как mysql, также может использоваться для определения версии сервера MySQL. Есть также некоторые другие операторы и команды, которые могут показать вам версию сервера. Оператор SELECT VERSION () отобразит только версию MySQL.

Какая версия MySQL у меня Windows Server 2012?

Щелкните значок домашней страницы в верхнем левом углу любой страницы или щелкните «Сервер: »Ссылка в самом верху. Вы должны увидеть номер версии сервера MySQL в правой части страницы (что-то вроде изображения ниже).

Как мне найти свою версию командной строки?

Сюда входит название операционной системы, номер версии и номер сборки.

Проверка вашей версии Windows с помощью CMD

  1. Нажмите клавишу [Windows] + [R], чтобы открыть диалоговое окно «Выполнить».
  2. Введите cmd и нажмите [OK], чтобы открыть командную строку Windows.
  3. Введите systeminfo в командной строке и нажмите [Enter], чтобы выполнить команду.

10 центов 2019 г.

Как мне найти версию базы данных?

Обработка

  1. Откройте SQL Server Management Studio и подключитесь к ядру базы данных экземпляра, версию которого вы хотите проверить.
  2. Выполните следующие три шага; Нажмите кнопку «Новый запрос» (или нажмите CTRL + N на клавиатуре). …
  3. Появится панель результатов, на которой будут показаны: Ваша версия SQL (Microsoft SQL Server 2012).

1 мар. 2019 г.

Какая последняя версия MySQL?

MySQL 8.0 — это самая последняя версия GA. Скачать MySQL 8.0 »

  • для общедоступной версии MySQL 8.0 (GA).
  • для общедоступной версии MySQL 5.7 (GA).
  • для общедоступной версии MySQL 5.6 (GA).

Как мне обновить MySQL до последней версии?

Чтобы выполнить обновление с помощью установщика MySQL:

  1. Запустите установщик MySQL.
  2. На панели управления щелкните «Каталог», чтобы загрузить последние изменения в каталог. …
  3. Щелкните Обновить. …
  4. Снимите выделение со всех продуктов, кроме сервера MySQL, если вы не собираетесь обновлять другие продукты в это время, и нажмите «Далее».
  5. Нажмите «Выполнить», чтобы начать загрузку.

В чем разница между MySQL и SQL?

SQL — это язык запросов, тогда как MySQL — это реляционная база данных, которая использует SQL для запросов к базе данных. Вы можете использовать SQL для доступа, обновления и управления данными, хранящимися в базе данных. … SQL используется для написания запросов к базам данных, MySQL облегчает хранение, изменение и управление данными в табличном формате.

Как запустить MySQL из командной строки?

Запустите клиент командной строки MySQL. Чтобы запустить клиент, введите следующую команду в окне командной строки: mysql -u root -p. Параметр -p необходим только в том случае, если для MySQL задан пароль root. При появлении запроса введите пароль.

Как проверить, работает ли MySQL локально?

Проверяем статус с помощью служебной команды mysql status. Мы используем инструмент mysqladmin, чтобы проверить, запущен ли сервер MySQL. Параметр -u указывает пользователя, который пингует сервер.

Как установить MySQL?

Процесс установки MySQL из архива ZIP выглядит следующим образом:

  1. Распакуйте основной архив в желаемый установочный каталог. …
  2. Создайте файл опций.
  3. Выберите тип сервера MySQL.
  4. Инициализировать MySQL.
  5. Запустите сервер MySQL.
  6. Защитите учетные записи пользователей по умолчанию.

Что не может быть связано с триггером?

Поскольку триггеры выполняются как часть транзакции, следующие операторы не допускаются в триггере: Все команды создания, включая создание базы данных, создание таблицы, создание индекса, создание процедуры, создание по умолчанию, создание правила, создание триггера и создание представления.

Как узнать версию своей ОС?

Какую версию операционной системы Windows я использую?

  1. Нажмите кнопку «Пуск»> «Настройки»> «Система»> «О системе». Откройте О настройках.
  2. В разделе «Характеристики устройства»> «Тип системы» проверьте, установлена ​​ли у вас 32-разрядная или 64-разрядная версия Windows.
  3. В разделе «Технические характеристики Windows» проверьте, какой выпуск и версия Windows работает на вашем устройстве.

Как узнать версию моей операционной системы Windows?

  1. Проведите пальцем от правого верхнего угла экрана, просматривая рабочий стол, чтобы открыть меню, а затем нажмите «Настройки».
  2. Выберите Информация о ПК. В редакции Windows отображается версия Windows.

Какая команда проверяет версию Python?

Введите «терминал» и нажмите ввод. Выполните команду: введите python –version или python -V и нажмите Enter. Версия Python отображается в следующей строке под вашей командой.

Часто возникает необходимость выяснить точную версию установленного сервера MySQL / MariaDB, в этой заметке я расскажу как эту самую версию узнать.

К своему удивлению, я обнаружил, что частенько специалисты не знают как выполнить эту простую процедуру или испытывают некоторые затруднения.
Ну что же — предлагаю несколько способов решить эту задачу.

Способ первый (с помощью MySQL CLI):

Выполним переход в CLI MySQL (Конечно для этого у Вас должны быть соответствующие права)

или

#mysql -u user -p password

где user — имя пользователя и password — пароль соответственно.

После чего выполняем следующую команду:

Результатом выполнения этой команды в CLI MySQL будет нечто вроде:

+—————————————+
| version()                             |
+—————————————+
| 10.4.18-MariaDB-1:10.4.18+maria~focal |
+—————————————+
1 row in set (0.000 sec)

Где 10.4.18-MariaDB — собственно и есть версия установленной СУБД (в данном случае MariaDB версии 10.4 ).

Способ второй (c помощью консоли сервера SHELL):

Выполним в консоли сервера следующую команду:

или

Команду лучше выполнять от пользователя root или другого пользователя с нужными полномочиями, любо можно воспользоваться sudo
В ответ в консоли Вы увидите что-то вроде:

 mysql  Ver 15.1 Distrib 10.4.18-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Где 10.4.18-MariaDB — и есть используемая версия СУБД, в данном случае на базе Ubuntu 20.04.

Update от 19.03.2021

К нам обратился пользователь с вопросом о том как узнать версию MySQL, если доступен только FTP и закрыты даже внешние подключения к СУБД.

Способ третий (если доступен только FTP):

Итак — в корневой директории нашего сайта создаем файл sqlver.php со следующим содержимым:

Логин и пароль пользователя — можно посмотреть в настройках CMS или конфигурационном файле, которій используется в Вашем проекте.
Далее в браузере открываем адрес сайта и путь к нашему новому файлу ( например example.com/sqlver.php ) и видим вывод команды:

Версия сервера MySQL / MariaDB: 5.5.5-10.3.28-MariaDB-log

Где 10.3.28-MariaDB — соответственно используемая версия СУБД.

Заключение

Надеюсь, для кого-то этот материал окажется полезным и узнать версию MySQL или MariaDB для Вас — дело нескольких секунд.

What’s Your Reaction?

Существует как минимум три разновидности MySQL. Это оригинальная MySQL от Oracle, MariaDB от разработчика оригинальной MySQL, которая появилась после того как MySQL стала принадлежать Oracle и PerconaDB — высокопроизводительный форк MySQL с собственным движком хранения данных. У каждой разновидности есть несколько актуальных версий, которые могут поставляться по умолчанию в зависимости от вашего дистрибутива.

В этой статье мы рассмотрим как узнать версию MySQL. Это важно, потому что от версии зависят поддерживаемые возможности, а также некоторые ограничения.

Самый простой способ посмотреть версию MySQL если у вас есть доступ к серверу, это выполнить команду mysqld с опцией —version:

mysqld --version

Как видите, в данном случае установлена MariaDB 10.3. Если у вас есть имя пользователя и пароль для доступа к базе данных, вы можете подключиться к ней с помощью консольного клиента. Он тоже выводит версию сервера при подключении. Например:

mysql -u имя_пользователя -h хост -p

Или:

sudo mysql -u root

Если вы уже подключены к серверу и хотите посмотреть версию, используйте такую команду:

mysql> SELECT VERSION();

Или можно посмотреть значение переменной version:

mysql> SHOW VARIABLES LIKE '%version%';

Если у вас нет доступа к серверу баз данных и вы не можете подключится к нему с помощью терминала, то вы всё ещё можете посмотреть версию с помощью PhpMyAdmin. Здесь вам тоже надо иметь данные для авторизации. Просто авторизуйтесь в программе и на главной странице, в разделе Сервер базы данных вы увидите нужную информацию:

Как видите узнать версию MySQL не так уже и сложно. Эту задачу можно решить множеством способов, причём выводится не только версия но и имя разновидности базы данных. Например, MariaDB, MySQL или Percona. Если у вас остались вопросы, спрашивайте в комментариях!

Creative Commons License

Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .

Об авторе

Основатель и администратор сайта losst.ru, увлекаюсь открытым программным обеспечением и операционной системой Linux. В качестве основной ОС сейчас использую Ubuntu. Кроме Linux, интересуюсь всем, что связано с информационными технологиями и современной наукой.

Известно как минимум три вида MySQL. Это оригинальная от Oracle, MariaDB от разработчика оригинальной, которая появилась после того как она стала принадлежать Oracle и PerconaDB — форк с собственным движком хранения данных. У каждого вида есть несколько актуальных версий, которые могут поставляться по умолчанию в зависимости от вашего дистрибутива. Дальше рассмотрим как узнать версию. От версии зависят поддерживаемые возможности, а также некоторые ограничения.

Как определить версию MYSQL

Наиболее способ узнать версию если у вас есть доступ к серверу, это выполнить команду mysqld с опцией —version:

$ mysqld —version

В этом случае установлена MariaDB 10.3. Если у вас есть имя пользователя и пароль для доступа к базе данных, вы можете подключиться к ней с помощью консольного клиента. Он тоже выводит версию сервера при подключении. Например:

$ mysql -u имя_пользователя -h хост -p

Или:

$ sudo mysql -u root

Вы могли подключаться к серверу и хотите посмотреть версию, используйте такую команду:

$ mysql> SELECT VERSION();

Можно посмотреть значение переменной version:

mysql> SHOW VARIABLES LIKE '%version%';

Если у вас нет доступа к серверу баз данных и вы не можете подключится к нему с помощью терминала, то вы всё ещё можете посмотреть версию с помощью PhpMyAdmin. Необходимо иметь данные для авторизации. Просто авторизуйтесь в программе и на главной странице, в разделе Сервер базы данных вы увидите нужную информацию.

Узнать версию просто Эту задачу можно решить множеством способов, причём выводится не только версия но и имя разновидности базы данных. Например, MariaDB или Percona..

Понравилась статья? Поделить с друзьями:
  • Как узнать какая у меня встроенная видеокарта на windows 10
  • Как узнать какая версия microsoft office установлена на windows 10
  • Как узнать какая материнка стоит на компьютере windows 7 не разбирая
  • Как узнать какая у меня видеокарта на компьютере windows 10
  • Как узнать какая версия java установлена на windows 10