Telegram- 👇 😉
-
. WIKIMERIONET
Merion Mertics , ,

CRM

MySQL Server CentOS 7

SELECT * FROM problem;
(99 rows returned)

4

! MySQL Server CentOS 7. MySQL , , . MySQL , , .

, MySQL , CentOS 7 Minimal YUM Oracle, .


wget yum install wget.

, MySQL : http://dev.mysql.com/downloads/repo/yum/ , ( - Red Hat Enterprise Linux 7 / Oracle Linux 7) Download. , No thanks, just start my download

  MySQL Server  CentOS 7

wget :

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm 

- wget , , rpm Uvh mysql57-community-release-el7-11.noarch.rpm - ( Tab).

Oracle, MySQL :

yum y install mysql-community-server 

- .

  MySQL Server  CentOS 7

MySQL :

/usr/bin/systemctl enable mysqld 

MySQL :

/usr/bin/systemctl start mysqld 

, mysql_secure_installation - root grep 'temporary password' /var/log/mysqld.log. :

     MySQL Linux

/usr/bin/mysql_secure_installation , E+FW4tz8$?/7$dCm :

  • Set root password? [Y/n] Y - root;
  • Remove anonymous users? [Y/n] Y - ;
  • Disallow root login remotely? [Y/n] Y - ;
  • Remove test database and access to it? [Y/n] Y - ;
  • Reload privilege tables now? [Y/n] Y - ;

, , .


- , root . , MySQL mysql -u root -p mysql . testdb testuser ( ):

create database testdb;
grant all on appdb.* to 'testuser'@'localhost' identified by 'password';
quit

mysql -u testuser -p -h localhost testdb , SHOW DATABASES;

MySQL . MySQL mysql, user. , :

SELECT User, Host, Password FROM mysql.user; 

MySQL . :

  • SELECT - ;
  • User, Host, Password - , . , ;
  • FROM mysql.user - mysql user;
  • ; - , MySQL ;