Mysql на CentOS 7

In a web browser, visit:

https://dev.mysql.com/downloads/repo/yum/

Now that we’ve verified that the file wasn’t corrupted or changed, we’ll install the package:

This adds two new MySQL yum repositories, and we can now use them to install MySQL server:

We’ll start the daemon with the following command:

systemctl doesn’t display the outcome of all service management commands, so to be sure we succeeded, we’ll use the following command:

If MySQL has successfully started, the output should contain Active: active (running) and the final line should look something like:

  • Dec 01 19:02:20 centos-512mb-sfo2-02 systemd[1]: Started MySQL Server.

During the installation process, a temporary password is generated for the MySQL root user. Locate it in the mysqld.log with this command:

Make note of the password, which you will need in the next step to secure the installation and where you will be forced to change it. The default password policy requires 12 characters, with at least one uppercase letter, one lowercase letter, one number and one special character.

Step 3 — Configuring MySQL

MySQL includes a security script to change some of the less secure default options for things like remote root logins and sample users.

Use this command to run the security script.

Выполните следующие шаги :

  • [Y] — Установите пароль для пользователя root;
  • [Y] — Удалите анонимных пользователей;
  • [Y] — Запретите удаленное подключение пользователю root;
  • [Y] — Удалите тестовую базу данных и запретите доступ к ней;
  • [Y] — Перезагрузите таблице привилегий.

Авто логин в mysql консоль в /etc/my.cnf добавить:

 

 

To set the default to UTF-8, you want to add the following to my.cnf

 

One thought on “Mysql на CentOS 7

Добавить комментарий

Ваш адрес email не будет опубликован.