Max OS installation

There are two ways

  1. Install via BREW (recommended)
brew install mysql
Copy the code
  1. Install via DMG image

Download address: dev.mysql.com/downloads/m…

Download complete, double-click, as prompted to install.

Open “System Preferences “, find the mysql icon, and click to start mysql services.

After the installation is complete, open the CLI and log in to mysql

mysql -u root -p
Copy the code

If you forget the password, stop the mysql service and then run the command

# skip authentication sudo/usr/local/mysql/bin/mysqld_safe - skip - grant - tablesCopy the code

Open a new command line terminal and log in to mysql

Update user set authentication_string='123456' where user= 'root';Copy the code

Windows installation

Download: github.com/tporadowski…

Download the redis-x64-XXx. mis installation package

Once the download is complete, double-click the installation package and follow the instructions to install Redis

After the installation is complete, run it on the shell cli

redis-server.exe redis.windows.conf
Copy the code

If the following page is displayed, the installation is successful

Centos install

Mysql is no longer supported in centos7, MariaDB is used instead, MariaDB Api is fully compatible with mysql. Mysql is used for MariaDB.

The following installation methods are available:

1. EPEL installation (recommended)

Install the epel – release

sudo yum install epel-release
Copy the code

Install mysql using yum

sudo yum install -y mariadb-server
Copy the code

Centos deployed MariaDB

  1. Start the Mariadb DB service
systemctl start mariadb.service
Copy the code
  1. Added to Enable autoboot
systemctl enable mariadb.service

Copy the code
  1. Configure security for mysql
mysql_secure_installation
Copy the code
  1. On the interactive interface, modify the configuration as prompted
Enter current password for root (Enter for none): Re-enter New password: # re-enter New password: # re-enter New password: # re-enter New password: # Remove anonymous users? [Y/n] Y # login remotely? [Y/n] Y # Remove test database and access to it? Reload privilege tables now? [Y/n] Y # Reload the authorization tableCopy the code
  1. Access mysql database
mysql -uroot -p
Copy the code
  1. Create an account for remotely logging in to MySQL. For example, the account is DMS and the password is 123456
MariaDB> grant all on *.* to 'dms'@'%' IDENTIFIED BY '123456'; # replace DMS with root, can be set to allow root account remote login. MariaDB> flush privileges;Copy the code
  1. Check the available mysql ports
MariaDB> show global variables like 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port          | 3306  |
+---------------+-------+
1 row in set (0.00 sec)
Copy the code
  1. Connect to mysql using the mysql Gui tool

The connection configuration is as follows

host= Server IP addressport= Mysql port was obtained aboveuser = dms
password = 123456
Copy the code

reference

  • Manually deploy MySQL database (CentOS 7)