Установка MySQL 8.0 + Worbench на Windows 7/8/10+ #
Используя данную инструкцию вы сможете установить и настроить сервер базы данных MySQL, а также установить графическую оболочку для работы с базой данной в удобном виде.
1. Скачивание установщика MySQL Server #
Будем устанавливать MySQL как сервис в систему, нам будет необходима любая версия 8.0.x.
Скачиваем Windows Installer с официального сайта по этой ссылке:
Убедитесь что выбрана Windows в списке операционных систем и нажмите кнопку Download у версии с большим размером. Это версия не требует ничего качать их интернета при установке.
После будет предложено зарегистрироваться, мы этого избегаем нажимая по ссылке No thanks, just start my download.
После нажатия начнется скачивание файла вида mysql-installer-community-8.0.23.0.msi
Дождитесь окончания скачивания файла и после запустите скаченный файл.
2. Установка #
При запуске MySQL installer, первое что вам предложат — выбрать тип установки.
Выберите Сustom , в таком случае нам надо будет выбрать что установить
В списке выберем сам сервер баз данных, графическую среду работы с базам данных Workbench, и консоль для работы с базой данных. Для добавления нужных элементов, выберите в левом списке и нажмите одинарную стрелку указывающую вправо, в итоге вы должны получить следующий набор:
Выбирайте самую последнюю версию из списка, в нашем случае это 8.0.23, если на момент установки у вас версия выше — выбирайте версию соответсвующую скаченному файлу mysql-installer-community-8.0.23.0.msi
Нажимайте Next.
После этого установщик проверит, какие зависимости необходимо до установить, перед началом установки MySQL, это различные библиотеки. Список будет выглядеть так:
Для запуска скачивания и установки библиотек, нажмите Execute
В процессе установки дополнительных библиотек, вам будут предлагаться принять соглашения и установить.
После установки необходимых библиотек, у вас должны быть все зеленые отметки (на скриншоте подсвечено желтым).
В следующем окне вам будет еще раз показан список того что будет установлено, нажимайте Execute
Пойдет процесс установки, это может занять продолжительное время, до 15 минут.
В конечно итоге при успешной установке увидите:
После нажатия Next перейдете к настройке сервера базы данных.
В следующем окне галочки должны быть расположены как указано, а также обратите внимание на параметр Port , этот порт будет использоваться при подключении к серверу для работы с базой данных через Workbench или другой клиент.
Нажимаем Next и переходим к выбору типа пароля, в данном случае выбираем Use Strong Password Ecryption , так как нам не требуется совместимость с версией 5.7
После нажатия Next, будет важный этап — установка пароля для root пользователя.
Дополнительных пользователей создавать не будем, для учебных целей будем пользоваться доступом через пользователя root . В реальности, для каждой бд желательно иметь пользователя с минимальным набором прав для работы с базой данных.
Нажимаем Next и переходим к настройке сервиса в Windows
По умолчанию MySQL будет установлен как сервис, с указанным названием. База данных будет стартовать при запуске Windows, отдельно включать ее не потребуется.
Кликайте по Next и перед вам будет список действий, которые выполнятся в итоге:
Запускаем нажатием Execute, и ожидаем завершения:
Если перед вами такое же окно — поздравляем, установка прошла успешно! Осталось нажать Finish, в следующем окне Next и в последнем окне можно снять галочки.
Мы запустим нужное по необходимости. Осталось нажать на Finish — установка завершена полностью.
3. Проверка установки #
Чтобы убедиться что mysql сервер работает, давайте попробуем зайти в консоль управления mysql, для этого нажмите Пуск и вы папке MySQL выберите MySQL 8.0 Command Line Client — Unicode
После запуска будет предложено ввести пароль, надо ввести тот пароль, что мы и задавали.
После успешного ввода пароля, попадем в терминал mysql, именно тут можно вводить команды SQL, для проверки запросим данные по всем таблицам:
Именно в данной консоли можно выполнять все команды показанные в видео.
После этого можно выйти из терминала командой exit
Проверка прошла успешно и установка точно прошла успешна!
4. Подключение к серверу БД используя Workbech #
Найдите в списке программ в Пуске — Workbench
Запускайте, на первом окне у вас будет список подключений и одно подключение уже создано
это подключение к установленной бд, кликните по нему и вам предложат ввести пароль от пользователя root — вводите.
И теперь мы можем работать с базой данных:
5. Создание новой базы данных #
Чтобы загрузить дамп, необходимо создать базу данных в которую мы загрузим данные. Для этого нажмите на вкладку Schemas
На пустом месте кликните правой клавишей мыши и выберите пункт меню — Create Schema.
Введите название базы данных: skillbox
Выберите кодировки utf8 и utf8_general_ci
Вам покажут какой SQL запрос при этому будет выполнен, нажимаем Apply и получаем пустую базу данных.
6. Загрузка дампа #
К видеоуроку курса или домашнему заданию у вас будет прикреплен файл в котором хранятся данные учебной базы skillbox. Формат файла .sql
В нем хранится структура таблиц и данные которые в таблицах хранятся. Это все написано на SQL, поэтому наша задача выбрать в какой бд выполнить этот код.
Выберем базу данных по умолчанию, в которой будут выполняться все скрипты по умолчанию.
Для этого нажмите правой кнопкой мыши на базу данных skillbox и далее Set as default Schema
Выбранная база выделяется.
Далее в меню выберите File → Open SQL Script.
Выберите скаченный файл .sql, когда откроется, будет выглядеть так:
Осталось запустить, нажав на молнию, внизу в консоли увидите лог работы скрипта:
После того как выполнился код дампа, и видите зеленые галки, то обновите дерево баз данных, нажав на кнопку:
Зайдите в базу данных и откройте таблицу в режиме просмотра:
Вы увидите содержание таблицы:
На этом загрузка дампа завершена, с базой данной можно работать.
7. Как писать запросы #
Для того чтобы писать запросы к базе данных для выполнения домашнего задания, вы можете использовать Workbench, для этого вам надо выделить базу данных skillbox как базу по умолчанию. Для этого нажмите правой кнопкой мыши на базу данных skillbox и далее Set as default Schema
И после создать новый запрос кнопкой:
И в открывшемся файле пишите запрос, например:
Для выполнения запроса, также нажимайте на первую молнию, это команда выполнения всего текста запроса.
И у вас должен появится результат, в виде таблицы:
А значит запрос успешно выполнен. Таким образом вы можете выполнять домашние задания модуля.
Name already in use
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Copyright (c) 2007, 2023, Oracle and/or its affiliates.
This is a release of MySQL Workbench, a graphical tool for working with MySQL servers and databases.
License information can be found in the License file.
This distribution may include materials developed by third parties. For license and attribution notices for these materials, please refer to the License file.
For more information on MySQL Workbench, visit http://dev.mysql.com/doc/workbench/en
For additional downloads and the source of MySQL Workbench, visit http://dev.mysql.com/downloads
MySQL Workbench is brought to you by the MySQL team at Oracle.
MySQL Workbench is a graphical tool for working with MySQL servers and databases. MySQL Workbench fully supports MySQL server versions 5.6 and higher.
MySQL Workbench functionality covers five main topics:
SQL Development: Enables you to create and manage connections to database servers. Along with enabling you to configure connection parameters, MySQL Workbench provides the capability to execute SQL queries on the database connections using the built-in SQL Editor.
Data Modeling (Design): Enables you to create models of your database schema graphically, reverse and forward engineer between a schema and a live database, and edit all aspects of your database using the comprehensive Table Editor. The Table Editor provides easy-to-use facilities for editing Tables, Columns, Indexes, Triggers, Partitioning, Options, Inserts and Privileges, Routines and Views.
Server Administration: Enables you to administer MySQL server instances by administering users, performing backup and recovery, inspecting audit data, viewing database health, and monitoring the MySQL server performance.
Data Migration: Allows you to migrate from Microsoft SQL Server, Microsoft Access, Sybase ASE, SQLite, SQL Anywhere, PostreSQL, and other RDBMS tables, objects and data to MySQL. Migration also supports migrating from earlier versions of MySQL to the latest releases.
MySQL Enterprise Support: Support for Enterprise products such as MySQL Enterprise Backup, MySQL Firewall, and MySQL Audit.
The code repository on Github is where we publish a snapshot of our internal repository everytime a new release of the product is published. Use the MySQL bug system to report any issue you have. You can use Github or the MySQL bug system to contribute to the development. File a pull request on Github or a new issue on the MySQL Bug system with your patch and we will take care of it.
About
MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more.
MySQL Workbench
MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more. The app is available on Windows, Linux, and macOS.
Features and Highlights
Design
MySQL Workbench enables a DBA, developer, or data architect to visually design, model, generate, and manage databases. It includes everything a data modeler needs for creating complex ER models, forward and reverse engineering, and also delivers key features for performing difficult change management and documentation tasks that normally require much time and effort.
Develop
The tool delivers visual tools for creating, executing, and optimizing SQL queries. The SQL Editor provides color syntax highlighting, auto-complete, reuse of SQL snippets, and execution history of SQL. The Database Connections Panel enables developers to easily manage standard database connections, including MySQL Fabric. The Object Browser provides instant access to database schema and objects.
Administer
It provides a visual console to easily administer MySQL environments and gain better visibility into databases. Developers and DBAs can use the visual tools for configuring servers, administering users, performing backup and recovery, inspecting audit data, and viewing database health.
Visual Performance Dashboard
It provides a suite of tools to improve the performance of MySQL applications. DBAs can quickly view key performance indicators using the Performance Dashboard. Performance Reports provide easy identification and access to IO hotspots, high-cost SQL statements, and more. Plus, with 1 click, developers can see where to optimize their query with the improved and easy to use Visual Explain Plan.
Database Migration
MySQL Work bench now provides a complete, easy to use solution for migrating Microsoft SQL Server, Microsoft Access, Sybase ASE, PostgreSQL, and other RDBMS tables, objects and data to MySQL. Developers and DBAs can quickly and easily convert existing applications to run on MySQL both on Windows and other platforms. Migration also supports migrating from earlier versions of MySQL to the latest releases.
Как скачать mysql workbench
Table of Contents
MySQL Workbench is available for the following platforms:
Binary distributions of MySQL Workbench are avaliable for the above platforms. Source code distributions are also available as a tar.gz package, or an RPM package.
The following sections explain the installation process for each of these platforms.
3.1. Hardware Requirements
MySQL Workbench requires a current system to run smoothly. The minimum hardware requirements are:
CPU: Intel Core or Xeon 3GHz (or Dual Core 2GHz) or equal AMD CPU
Cores: Single (Dual/Quad Core is recommended)
RAM: 4 GB (6 GB recommended)
Graphic Accelerators: nVidia or ATI with support of OpenGL 1.5 or higher
Display Resolution: 1280×1024 is recommended, 1024×768 is minimum.
3.2. Software Requirements
The following operating systems are officially supported:
Windows 7 (64-bit, Professional level or higher)
Ubuntu 9.10 (64bit)
Ubuntu 8.04 (32bit/64bit)
For convenience the following builds are also available:
Windows XP SP3, Vista
Mac OSX (10.5 and 10.6) Intel
Ubuntu 8.04 (i386/x64)
Ubuntu 9.04 (i386/x64)
Fedora 11 (i386/x64)
MySQL Workbench also has the following general requirements:
The Microsoft .NET 3.5 Framework.
Cairo 1.6.0 or later
For convenience the Windows libraries are available as the download “ Dependencies for Compiling in Windows ”.
On start up, the application checks the OpenGL version and selects between software and hardware rendering. To determine the rendering method that is being used, open the Help menu and choose the System Info submenu.
3.3. Starting MySQL Workbench
The procedure for launching MySQL Workbench depends on the platform. Generally, there are two ways to launch MySQL Workbench from the command line and from the graphical user interface of the host operating system. Using the command-line launching facility is useful when you want to customize some aspects of the way MySQL Workbench operates. Launching MySQL Workbench for each of the supported platforms is described in the following sections.
In addition to platform-specific command line options, MySQL Workbench has the following command line options:
—admin instance — Launch MySQL Workbench and load the server instance specified.
—query connection — Launch MySQL Workbench and load the connection specified.
—model modelfile — Launch MySQL Workbench and load the model specified.
—script script — Launch MySQL Workbench and run the script specified.
—run code — Launch MySQL Workbench and run the code snippet specified.
—quit-when-done — quits MySQL Workbench after —script or —run finishes.
3.3.1. Installing MySQL Workbench on Windows
MySQL Workbench may be installed using the Windows installer file or it may be installed manually from a ZIP file.
Installing MySQL Workbench Using the Installer
MySQL Workbench can be installed using the Windows Installer ( .msi ) installation package. The MSI package bears the name mysql-workbench- version -win32.msi , where version indicates the MySQL Workbench version number.
Installing MySQL Workbench using the installer requires either Administrator or Power User privileges. If you are using the ZIP file without an installer, you do not need Administrator or Power User privileges.
Improving the MySQL Installation Wizard depends on the support and feedback of users. If you find that the MySQL Installation Wizard is lacking some feature important to you, or if you discover a bug, please report it in our bugs database. To do this use the Report a Bug option under the Help menu.
To install MySQL Workbench, right-click the MSI file and select the Install option from the pop-up menu, or simply double-click the file.
In the Setup Type window you may choose a Complete or Custom installation. To use all features of MySQL Workbench choose the Complete option.
Unless you choose otherwise, MySQL Workbench is installed in C:\ %PROGRAMFILES% \MySQL\MySQL Workbench 5.1 edition_type \ , where %PROGRAMFILES% is the default directory for programs for your locale. The %PROGRAMFILES% directory may be C:\Program Files or C:\programme .
Installing from the ZIP File
If you are having problems running the installer, as an alternative, you can download a ZIP file without an installer. That file is called mysql-workbench- version -win32.zip . Using a ZIP utility, unpack it to the directory of your choice. You may also want to create a shortcut on your desktop or the quick launch bar.
To install using the ZIP file, download the ZIP file to a convenient location and decompress the file. You can place the resulting directory anywhere on you system. You do not need to install or configure the application before using it.
3.3.2. Launching MySQL Workbench on Windows
To start MySQL Workbench on Windows select Start , Programs , MySQL and then select MySQL Workbench.
You may also start MySQL Workbench from the command line. To view the available command-line options, issue the command MySQLWorkbench -help | more from the MySQL Workbench installation directory. You will see the following output:
The MySQL Workbench version number is displayed followed by a usage message and then the options. Use the -swrendering option if your video card does not support OpenGL 1.5. The -version option can be used to display the MySQL Workbench version number. The -grtversion can be used to display the GRT shell version number. The other options are self-explanatory.
When using command-line options that display output to a console window, namely -help and -version , be sure that you pipe the output through the more command otherwise nothing will be displayed.
3.3.3. Uninstalling MySQL Workbench on Windows
The method for uninstalling MySQL Workbench will depend on how you install MySQL Workbench in the first place.
Rmoving MySQL Workbench when installed Using the Installer
To uninstall MySQL Workbench, open the Control Panel and Choose Add or Remove Programs . Find the MySQL Workbench entry and choose the Remove button. Doing this will remove MySQL Workbench.
Any modules added to the C:\Program Files\MySQL\MySQL Workbench version \modules directory will not be deleted.
It is not possible to remove MySQL Workbench from the command line if you have installed MySQL Workbench using the installer. Although you can manually remove some of the compoentns There is no command-line option for removing MySQL Workbench.
Removing the MySQL Workbench directory manually will not remove all the files belonging to MySQL Workbench.
When installed from a ZIP file
If you installed MySQL Workbench using a ZIP file, to remove MySQL Workbench you can just delete the MySQL Workbench directory.
If you installed any additional modules within the modules directory and you want to keep them, make sure you copy those modules to a different directory before deleting the MySQL Workbench directory.
3.3.4. Installing MySQL Workbench on Linux
There are several binary distributions of MySQL Workbench available for Linux. These include:
Fedora 10 amd64 (RPM)
Ubuntu 8.04 i386 (DEB)
Ubuntu 8.10 amd64 (DEB)
In addition to the binary distributions, it is also possible to download the MySQL Workbench source code as a tar.gz or RPM package.
Check the MySQL Workbench download page for the latest packages.
The procedure for installing on Linux depends on which Linux distribution you are using.
Installing DEB packages
On Ubuntu, and other systems that use the Debian package scheme, you can install MySQL Workbench using a command such as:
Note that package .deb will be the MySQL Workbench package, for example, mysql-workbench-oss- version _i386.deb , where version is the MySQL Workbench version number.
You may be warned that certain libraries are not available, depending on what you already have installed. Install the required libraries and then install the MySQL Workbench package again.
Installing RPM packages
On RedHat-based systems, and other systems using the RPM package format, MySQL Workbench can be installed by a command such as:
Again, note that package .rpm will be the MySQL Workbench package, for example, mysql-workbench-oss- version -1fc10.x86_64.rpm , and version is the MySQL Workbench version number.
3.3.5. Launching MySQL Workbench on Linux
Once MySQL Workbench has been installed it can be launched by selecting Applications , Programming , MySQL Workbench from the main menu.
MySQL Workbench can also be launched from the command line on Linux. Type the command:
This will display the available command-line options:
3.3.6. Uninstalling MySQL Workbench on Linux
The procedure for uninstalling MySQL Workbench on Linux depends on the packe you are using.
Uninstalling DEB packages
For Debian packages the command is:
This does not remove the configuration files. If you wish to also remove the configuration files use:
Uninstalling RPM packages
To uninstall RPM packages use:
This does not remove the configuration files.
3.3.7. Installing MySQL Workbench on Mac OS X
MySQL Workbench is available for Mac OS X and is distributed as a DMG file. The file is named mysql-workbench-oss- version -osx10.5-i686.dmg , where version is the MySQL Workbench version.
To install MySQL Workbench on Mac OS X, simply download the file. Double-click the downloaded file. You will be presented with the installation screen:
Figure 3.1. MySQL Workbench Mac OS X Installation Screen
Drag the MySQL Workbench icon onto the Application icon as instructed. MySQL Workbench is now installed.
You can now launch MySQL Workbench from the Applications folder.
3.3.8. Launching MySQL Workbench on Mac OS X
To launch MySQL Workbench on Mac OS X, simply open the Applications folder in the Finder, then double-click MySQL Workbench.
It is also possible to start MySQL Workbench from the command line:
A model file must be specified.
3.3.9. Uninstalling MySQL Workbench on Mac OS X
To uninstall MySQL Workbench for Mac OS X, simply locate MySQL Workbench in the Applications folder, right-click, and select Move to Trash . The application is uninstalled.