Ali cloud (ecs server) using 3-mysql database installation and remote deployment

1. Install

1. Download the rpm package, download address HTTP: // dev.mysql.com/downloads/mysql/ , choose Linux-Generic version

 

2 . Create / usr / local / mysql folder, 4 rpm package uploaded to the directory      
my mysql installation package and visualization tools navicat have been uploaded in the cloud disk, a friend in need of immediate concern for public numbers (out of school python) to acquire two-dimensional code below .

 

3 . To the directory, enter the command -ivh MySQL-Community-RPM common- 5.7 . 15 - . 1 .el7.x86_64.rpm common mounting

 

4 . If the installation error, enter the command remove MariaDB -Y-libs- yum . 1 : 5.5 . 44 is - 2 .el7.centos.x86_64 packet collision repair, 
and then perform step 2 to re-install Common (later remove the above parameters command out of the red part, different computer may be inconsistent)

 

5 is then re-executes step 2, RPM-Community-common- -ivh MySQL 5.7 . 15 - . 1 .el7.x86_64.rpm common mounting 

 

 

6 . Enter command -ivh MySQL-Community-RPM libs- 5.7 . 15 - . 1 .el7.x86_64.rpm mounted libs

 

7 .. enter commands -ivh MySQL-Community-RPM Client- 5.7 . 15 - . 1 .el7.x86_64.rpm client installation

 

 

8 input commands -ivh MySQL-Community-RPM Server-. 5.7 . 15 - . 1 .el7.x86_64.rpm server installation

 

9 . Enter the service mysqld start, start mysql

 

10 Enter systemctl enable mysqld.service, can be set to boot from the start mysql

 

 

11 Enter grep " password " / var /log/mysqld.log view and copy mysql randomly generated passwords

 

 

12 . Enter the command mysql -u root -p enter, copy the code and paste over, directly enter, you can enter

 

 

13. Enter the command SET password = password ( ' new password ' ); set a new password, the password note numbers lowercase letters capitalized special symbols can have, otherwise an error, and then exit to exit, re-enter the new password test, the success of the password modification

 

 

 2. As already detailed write install mysql, we have to turn down a remote deployment

"Host server connection error occurs when connecting to the database using Navicat ' XXX ' IS to Connect not allowed to the this MySQL Server" error. Like this error, it is a typical remote permissions problems.

1. Log mql mysql -u root -p

 

2 Use the show databases; view the database 
  using use mysql; select mysql database

3. Then, enter the command: grant all PRIVILEGES on db_name * to 'username'@'xxx.xxx.xx.x' identified by 'password' WITH GRANT OPTION;.

  The above statement said it would authorize all the tables in the database db_name rights to this username users, allows users to remotely login username in xxx.xxx.xx.x this IP, set the username and password for the user's password.

  Analysis parameters:

  all PRIVILEGES represents all the permissions given to the designated user, herein given may be replaced with a specific permission, for example: SELECT , INSERT, Update, Delete, Create, etc. drop between the specific permissions by "," separated by commas.

  . db_name * refers to the above rights which are specific to the table, db_name refers to the database name, followed by the * means that for all tables, can thus be inferred: For all the tables of a database of all authorized. "* *" for all the tables of a database authorized to "database name. *", a database table for a license for the "database name table name."

  username represents what you want to give the user authorization, the user may be present in the user, may be non-existent users. (You can use direct root)

  xxx.xxx.xx.x indicates that the IP address of the remote connection, your IP, if you do not want to restrict the IP link is set to "%" can be.

  username password for the user's password (easy to remember and be consistent with the original database)

  After the final implementation of the above statements, usually with immediate effect, the return value is as follows:

  Query OK, 0 rows affected (0.01 sec)

  Without the above statement then execute the following command, to take effect immediately.

  Mysql> flush privileges

  If you still can not connect to restart under Linux.

I am using all authorization for all data tables directly: grant all PRIVILEGES on * * to 'root' @ '%' identified by '111111' WITH GRANT OPTION;.

 

 

4 can then be used with the machine end connector Navicat database, and operates to create a database of the build table.

 

 3.

3. The need to go to the port is set to open Ali cloud server 
   can view the tutorial: https://www.cnblogs.com/wang102030/p/11516831.html

 

 Welcome to the personal number of public concern (out of school python) which I have summarized some of the self-python, about database installation, reptiles case and skills.

 

 

 

Guess you like

Origin www.cnblogs.com/wang102030/p/11515586.html