Mysql with phpmyadmin windows

Работа с базой данных. MySQL

MySQL и phpMyAdmin

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

Чтобы упростить себе работу с базами данных MySQL установим специальный набор скриптов phpMyAdmin. phpMyAdmin представляет интуитивный веб-интерфейс для управления базами данных MySQL. Используя данный инструмент, гораздо легче работать с базами данных, чем управлять MySQL через консоль.

Для установки phpMyAdmin загрузим архив и распакуем в папку C:\localhost, где находятся документы для php. Распакованную папку переименуем для краткости в phpMyAdmin .

В распакованном каталоге phpMyAdmin создадим файл config.inc.php со следующим содержанием:

И чтобы убедиться, что все настроено правильно, в браузере перейдем к phpMyAdmin, например, http://localhost:8080/phpmyadmin :

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

В правой части интерфейса phpMyAdmin содержатся основные инструменты управления базами данных, а также различная конфигурационная информация.

Создание базы данных MySQL в phpMyAdmin

Чтобы обмениваться данными с сервером MySQL (сохранять, изменять, удалять, получать данные), нам естественно нужна база данных. Создать базу данных мы можем из консоли MySQL, а также из визуального интерфейса phpMyAdmin.

Откроем интерфейс phpMyAdmin. Перейдем на вкладку Базы данных . Под меткой Создать базу данных введем какое-нибудь имя для новой бд, например, compstore и нажмем на кнопку «Создать».

И после этого мы получим сообщение об успешном создании новой бд, и она будет добавлена в списки баз данных.

Новая база данных пока пуста и не содержит ничего. Добавим в нее таблицу, которая будет хранить данные. Для этого нажмем на название базы данных и мы попадем на вкладку «Структура», где нам будут предложены опции новой таблицы. В поле «Имя» введем название новой таблицы. Пусть, таблицы будет хранить данные о моделях смартфонов, поэтому введем название «phones», а в качестве количества столбцов введем цифру 3:

Для создания таблицы нажмем на кнопку «Вперед». После этого у нас появится набор ячеек для установки параметров столбцов. Укажем последовательно для имен столбцов следующие: id, name, company. В качестве типа укажем для столбцов id тип INT , а для столбцов name и company — тип VARCHAR . Для столбцов name и company в поле «Длина/Значения» укажем число 200 — оно будет указывать максимальную длину строки в символах. Также для столбца id укажем в поле «Индекс» PRIMARY а в поле «A_I» (AutoIncrement) поставим галочку:

Читайте также:  Mysql bind address all windows

Таким образом, таблица будет иметь столбцы для уникального идентификатора, названия телефона и названия производителя. И затем нажмем внизу на кнопку «Сохранить».

После создания таблицы мы сможем увидеть в колонке баз данных таблицу и ее столбцы:

Это не единственный способ создания таблиц в phpMyAdmin, так как здесь мы можем управлять базой данных с помощью запросов SQL. Так, выделим в списке баз данных нашу базу и перейдем на вкладку «SQL». Она отображает поле для ввода команды на языке запросов SQL. Введем в него следующую команду:

Это стандартная команда создания таблицы на языке SQL. После ключевых слов CREATE Table идет название создаваемой таблицы, а затем в скобках идут через запятую определения столбцов.

Каждое определение столбцов содержит имя столбца, его тип и ряд дополнительных значений. Например, в определении столбца id ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ) указывается имя столбца, тип — INT, а также то, что столбец обязательно должен иметь значение — NOT NULL, что его значение будет автоматически увеличиваться на единицу с добавлением нового объекта — AUTO_INCREMENT, и что он играет роль первичного ключа — PRIMARY KEY.

В целом создаваемая таким образом таблица будет равносильна той, что была создана ранее. Нажмем кнопку «Вперед», и будет создана вторая таблица phones1.

phpMyAdmin Bringing MySQL to the web

About

phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement.

phpMyAdmin comes with a wide range of documentation and users are welcome to update our wiki pages to share ideas and howtos for various operations. The phpMyAdmin team will try to help you if you face any problem; you can use a variety of support channels to get help.

phpMyAdmin is also very deeply documented in a book written by one of the developers – Mastering phpMyAdmin for Effective MySQL Management, which is available in English and Spanish.

To ease usage to a wide range of people, phpMyAdmin is being translated into 72 languages and supports both LTR and RTL languages.

phpMyAdmin is a mature project with a stable and flexible code base; you can find out more about the project and its history and the awards it earned. When the project turned 15, we published a celebration page.

The phpMyAdmin project is a member of Software Freedom Conservancy. SFC is a not-for-profit organization that helps promote, improve, develop, and defend Free, Libre, and Open Source Software (FLOSS) projects.

phpMyAdmin Bringing MySQL to the web

Download

Many operating systems already include a phpMyAdmin package and will automatically keep it updated, however these versions are sometimes slightly outdated and therefore may be missing the latest features. Additionally, the configuration process varies widely by package and may not adhere to the official phpMyAdmin documentation. That being said, it is usually the quickest and easiest way of keeping an updated installation. Please contact your OS vendor for more information. Some additional information is also available in our documentation. If you just want to try phpMyAdmin in a virtual machine, you might want to check the available software appliances which provide phpMyAdmin.

Читайте также:  Как изменить атрибуты для папки windows

If you do not find a suitable package or wish to install your own phpMyAdmin, you can download one of the following kits. Please note that each version has requirements for the minimum PHP and MySQL versions.

Since July 2015 all phpMyAdmin releases are cryptographically signed by the releasing developer. You should verify that the signature matches the archive you have downloaded. Verification instructions are placed in our documentation in the Verifying phpMyAdmin releases chapter.

phpMyAdmin 5.1.0

Released 2021-02-24, see release notes for details.

Current version compatible with PHP 7.1 and newer and MySQL/MariaDB 5.5 and newer.

File Size Verification
phpMyAdmin-5.1.0-all-languages.zip 14.4 MB [PGP] [SHA256]
phpMyAdmin-5.1.0-all-languages.tar.gz 13.1 MB [PGP] [SHA256]
phpMyAdmin-5.1.0-all-languages.tar.xz 7.5 MB [PGP] [SHA256]
phpMyAdmin-5.1.0-english.tar.gz 8.5 MB [PGP] [SHA256]
phpMyAdmin-5.1.0-english.tar.xz 5.6 MB [PGP] [SHA256]
phpMyAdmin-5.1.0-english.zip 10.0 MB [PGP] [SHA256]
phpMyAdmin-5.1.0-source.tar.xz 17.8 MB [PGP] [SHA256]

phpMyAdmin 4.9.7

Released 2020-10-15, see release notes for details.

Older version compatible with PHP 5.5 to 7.4 and MySQL/MariaDB 5.5 and newer. Currently supported for security fixes only.

File Size Verification
phpMyAdmin-4.9.7-all-languages.zip 10.7 MB [PGP] [SHA256]
phpMyAdmin-4.9.7-all-languages.tar.gz 9.7 MB [PGP] [SHA256]
phpMyAdmin-4.9.7-all-languages.tar.xz 5.9 MB [PGP] [SHA256]
phpMyAdmin-4.9.7-english.tar.gz 5.0 MB [PGP] [SHA256]
phpMyAdmin-4.9.7-english.tar.xz 3.9 MB [PGP] [SHA256]
phpMyAdmin-4.9.7-english.zip 6.2 MB [PGP] [SHA256]
phpMyAdmin-4.9.7-source.tar.xz 11.6 MB [PGP] [SHA256]

Development Versions

phpMyAdmin Git repository is located at https://github.com/phpmyadmin/phpmyadmin.git and you can browse them online using GitHub. Note that phpMyAdmin uses Composer to manage library dependencies, when using git development versions you must manually run Composer. Please see the documentation for details.

More information about using Git is available on development page.

phpMyAdmin 5.2+snapshot

Future version compatible with PHP 7.2 and newer and MySQL/MariaDB 5.5 and newer.

File Size Verification
phpMyAdmin-5.2+snapshot-all-languages.zip 14.4 MB [SHA256]
phpMyAdmin-5.2+snapshot-all-languages.tar.gz 13.0 MB [SHA256]
phpMyAdmin-5.2+snapshot-all-languages.tar.xz 7.5 MB [SHA256]
phpMyAdmin-5.2+snapshot-english.tar.gz 8.5 MB [SHA256]
phpMyAdmin-5.2+snapshot-english.tar.xz 5.5 MB [SHA256]
phpMyAdmin-5.2+snapshot-english.zip 10.1 MB [SHA256]
phpMyAdmin-5.2+snapshot-source.tar.gz 45.4 MB [SHA256]
phpMyAdmin-5.2+snapshot-source.tar.xz 18.6 MB [SHA256]
phpMyAdmin-5.2+snapshot-source.zip 54.1 MB [SHA256]

phpMyAdmin 5.1+snapshot

Current version compatible with PHP 7.1 and newer and MySQL/MariaDB 5.5 and newer.

File Size Verification
phpMyAdmin-5.1+snapshot-all-languages.zip 14.2 MB [SHA256]
phpMyAdmin-5.1+snapshot-all-languages.tar.gz 12.8 MB [SHA256]
phpMyAdmin-5.1+snapshot-all-languages.tar.xz 7.4 MB [SHA256]
phpMyAdmin-5.1+snapshot-english.tar.gz 8.3 MB [SHA256]
phpMyAdmin-5.1+snapshot-english.tar.xz 5.4 MB [SHA256]
phpMyAdmin-5.1+snapshot-english.zip 9.8 MB [SHA256]
phpMyAdmin-5.1+snapshot-source.tar.gz 43.7 MB [SHA256]
phpMyAdmin-5.1+snapshot-source.tar.xz 17.8 MB [SHA256]
phpMyAdmin-5.1+snapshot-source.zip 50.7 MB [SHA256]

Latest Stable Version

You can also directly download latest version on following URLs:

File Size Verification
phpMyAdmin-latest-all-languages.zip 14.4 MB [PGP] [SHA256]
phpMyAdmin-latest-all-languages.tar.gz 13.1 MB [PGP] [SHA256]
phpMyAdmin-latest-all-languages.tar.xz 7.5 MB [PGP] [SHA256]
phpMyAdmin-latest-english.tar.gz 8.5 MB [PGP] [SHA256]
phpMyAdmin-latest-english.tar.xz 5.6 MB [PGP] [SHA256]
phpMyAdmin-latest-english.zip 10.0 MB [PGP] [SHA256]
phpMyAdmin-latest-source.tar.xz 17.8 MB [PGP] [SHA256]

We also publish a variety of formats intended for parsing by scripts to download the latest version. Read more about those on our syndication page.

Older Releases

You can find older releases on separate files page. You can also get them from our Git repository (check developer information for instructions). Older releases are unsupported.

Installing phpMyAdmin

The full process of installing phpMyAdmin is described in our manual. You can also find information there about how to install phpMyAdmin on your Linux distribution.

Official Docker image

The phpMyAdmin team maintains an official Docker image for phpMyAdmin. It is fully documented in our manual and you can install it using:

Installing using Composer

Due to technical limitations, we’re currently unable to publish phpMyAdmin directly in Packagist repository, but it is possible to install phpMyAdmin from our own Composer repository. Please check our manual for more information.

Appliances

Software appliances are becoming a popular way of distributing software. They are distributed as an image, which can be directly used by system (be it ISO image for bootable CD or virtual disks for some type of virtualization).

There are quite many appliances which provide phpMyAdmin as a management tool for MySQL. It usually comes as part of LAMP stack but there might be other offerings as well. Please check your favorite appliance provider, ISV or app store for it. Some of the appliances are listed on Wikipedia.

Supported versions

Generally only last stable branch is supported, but there are LTS branches to support older PHP versions. Current stable branch is supported for bug fixes, LTS branches for security fixes only.

Version End of regular
support
End of extended
security support (LTS)
Note
5.1 TBD
5.0 TBD
4.9 December 31, 2019 TBD LTS to support PHP 5.5-7.0
4.8 June 4, 2019
4.7 April 7, 2018
4.6 April 1, 2017
4.5 April 1, 2016
4.4 October 1, 2016
4.3 October 1, 2015
4.2 July 1, 2015
4.1 January 1, 2015
4.0 December 31, 2013 April 1, 2017 LTS to support PHP 5.2-5.4.

Thank you for downloading phpMyAdmin

Your download should start soon, if not please click here.

Please verify the downloaded file

Please take additional steps to verify that the file you have downloaded is not corrupted, you can verify it using the following methods:

  • Verify its PGP signature, see the Verifying phpMyAdmin releases chapter for more information.
  • Check that the file’s SHA256 hash matches

phpMyAdmin needs your continued support to grow and thrive

phpMyAdmin would not exist without the work of many volunteers and contractors. You can support us to make phpMyAdmin even better by donating to our project. Every donation counts!

We have also a sponsorship program for corporates who are willing to spent more money and get some benefits such as a logo placement in return.

Читайте также:  Download windows update kb4019990
Оцените статью