목차
1. 설치 환경 준비
2. mysql 초기화
3. 보안 옵션 구성
4. 동일한 호스트 예
5. 추가 mysql 설치 및 제거 참조
데이터 베이스 MySQL 튜토리얼 Linux 기반 glibc 버전 mysql 5.7.12 설치

Linux 기반 glibc 버전 mysql 5.7.12 설치

Feb 13, 2017 am 10:43 AM
glibc linux mysql


mysql 데이터베이스 설치를 완료하려면 다양한 옵션이 있습니다. 가장 일반적으로 사용되는 것은 바이너리 설치와 소스 코드 설치입니다. 바이너리 설치 방법에는 rpm 버전과 glibc 버전이 있습니다. rpm 버전은 특정 Linux 버전으로 컴파일됩니다. Linux 버전이 일치하면 설치할 수 있습니다. 예를 들어 RedHat6 또는 RedHat7용 rpm 패키지를 컴파일한 경우 해당 설치를 다운로드하면 됩니다. 특정 glibc 버전을 기반으로 컴파일된 또 다른 바이너리 설치 패키지가 있습니다. 이 기사에서는 주로 glibc 기반의 mysql 설치를 설명합니다.

1. 설치 환경 준비

1

2

3

4

5

###准备安装介质下载地址:http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.12-linux-glibc2.5-x86_64.tar.gz ###或者使用wget方式直接下载对应的版本

# wget http://www.php.cn/# mkdir -pv /u01/app# mkdir -pv /u01/soft# mkdir -pv /u02/mysqldata# cd /u01/soft# wget http://www.php.cn/

# tar -xf mysql-5.7.12-linux-glibc2.5-x86_64.tar.gz# ln -sv /u01/soft/mysql-5.7.12-linux-glibc2.5-x86_64 /u01/app/mysql`/u01/app/mysql' -> `

/u01/soft/mysql-5.7.12-linux-glibc2.5-x86_64'###下面添加mysql用户# useradd -r mysql -s /sbin/nologin# chown -R mysql:mysql /u01/app/mysql

# chown -R mysql:mysql /u02/mysqldata

로그인 후 복사
로그인 후 복사

2. mysql 초기화

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

###使用以下的方式来初始化# cd /u01/app/mysql/bin# ./mysqld --initialize --basedir=/u01/app/mysql --datadir=/u02/mysqldata --user=mysql

--explicit_defaults_for_timestamp2016-06-28T02:18:23.437852Z 0 [Warning] InnoDB: New log files created, LSN=457902016-06-28T02:18:23.718104Z 0

[Warning] InnoDB: Creating foreign key constraint system tables.2016-06-28T02:18:23.866501Z 0 [Warning] No existing UUID has been found,

so we assume that this is the first time that this

     server has been started. Generating a new UUID: 9731b834-3cd6-11e6-8654-fcaa14e34b30.2016-06-28T02:18:23.896540Z 0

     [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.2016-06-28T02:18:23.898416Z

     1 [Note] A temporary password is generated for root@localhost: )%%D0pr,mU.Y# ls /u02/mysqldata/auto.cnf    client-cert.pem 

     ibdata1      performance_schema  sys

ca-key.pem  client-key.pem   ib_logfile0  server-cert.pem

ca.pem      client-req.pem   ib_logfile1  server-key.pem

ca-req.pem  ib_buffer_pool   mysql        server-req.pem###从上面的结果可以看出 mysql 5.7多出了证书相关文件,安全较5.6有较大提升

###mysql_install_db方式初始化数据已经被废弃# ./mysql_install_db --basedir=/u01/app/mysql --datadir=/u02/mysqldata --user=mysql2016-06-28 10:04:56

[WARNING] mysql_install_db is deprecated.

Please consider switching to mysqld --initialize2016-06-28 10:05:15 [WARNING] The bootstrap log isn't empty:2016-06-28 10:05:15 [WARNING]

2016-06-28T02:04:56.688237Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead2016-06-28T02:04:56.688654Z 0

[Warning] Changed limits: max_open_files: 1024 (requested 5000)2016-06-28T02:04:56.688657Z 0 [Warning] Changed

limits: table_open_cache: 431 (requested 2000)###如上书提示,mysql_install_db方式初始化数据已经被废弃,建议使用mysqld --initialize,同时也给出了参数限制的警告

# cp /u01/app/mysql/support-files/my-default.cnf /etc/my.cnf# cp /u01/app/mysql/support-files/mysql.server /etc/init.d/mysqld# vim /etc/my.cnf [mysqld]

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

basedir=/u01/app/mysql

datadir=/u02/mysqldata

user=mysql

port=3306# vim /etc/profile.d/mysql.shexport MYSQL_HOME=/u01/app/mysql

export PATH=$PATH:$MYSQL_HOME/bin# source /etc/profile.d/mysql.sh# service mysqld startStarting MySQL.                                            [  OK  ]

로그인 후 복사

3. 보안 옵션 구성

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

###使用初始化时得到的密码配置安全选项

# /u01/app/mysql/bin/mysql_secure_installation -p)%%D0pr,mU.Y

mysql_secure_installation: [Warning] Using a password on the command line interface can be insecure.

 

Securing the MySQL server deployment.

 

The existing password for the user account root has expired. Please set a new password.

 

New password:

 

Re-enter new password:

 

VALIDATE PASSWORD PLUGIN can be used to test passwordsand improve security. It checks the strength of passwordand allows the users to set

only those passwords which aresecure enough. Would you like to setup VALIDATE PASSWORD plugin?

 

Press y|Y for Yes, any other key for No: y   ###是否校验密码插件

 

There are three levels of password validation policy:

 

LOW    Length >= 8MEDIUM Length >= 8, numeric, mixed case, and special characters

STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

 

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2  ###设定密码策略等级Using existing password for root.

 

Estimated strength of the password: 100 Change the password for root ? ((Press y|Y for Yes, any other key for No) :

 

 ... skipping.By default, a MySQL installation has an anonymous user,

allowing anyone to log into MySQL without having to have

a user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.

You should remove them before moving into a production

environment.

 

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y  ###是否移除匿名用户

Success.

 

Normally, root should only be allowed to connect from'localhost'. This ensures that someone cannot guess atthe root password from the network.

 

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y  ###是否关闭root远程登陆功能

Success.By default, MySQL comes with a database named 'test' that

anyone can access. This is also intended only for testing,and should be removed before moving into a production

environment.

 

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y  ###是否移除测试数据库

 - Dropping test database...

Success.

 

 - Removing privileges on test database...

Success.

 

Reloading the privilege tables will ensure that all changes

made so far will take effect immediately.

 

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y  ###是否立即生效权限表

Success.All done!

 

###以下为安全增强相关的部分参数

 

mysql> show variables like 'valid%';+--------------------------------------+--------+| Variable_name                   | Value  |

+--------------------------------------+--------+| validate_password_dictionary_file    |        |

| validate_password_length             | 8      |

| validate_password_mixed_case_count   | 1      |

| validate_password_number_count       | 1      |

| validate_password_policy             | STRONG |

| validate_password_special_char_count | 1      |

+--------------------------------------+--------+

로그인 후 복사

4. 동일한 호스트 예

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

###按上面描述的步骤创建其对应的目录及授权后,再执行初始化###使用新的配置文件,如下文本示例使用的为3317# mkdir -pv /u02/mysqldata3317# chown -R mysql:mysql

/u02/mysqldata 3317# grep -v ^# /etc/my3317.cnf[mysqld]

basedir=/u01/app/mysql

datadir=/u02/mysqldata3317

user=mysql

port=3317socket=/tmp/mysql3317.sock# cd /u01/app/mysql/bin# ./mysqld --defaults-file=/etc/my3317.cnf --initialize --user=mysql

--explicit_defaults_for_timestamp# 2016-06-30T08:32:52.497519Z 0 [Warning] InnoDB: New log files created, LSN=457902016-06-30T08:32:52.852457Z 0

[Warning] InnoDB: Creating foreign key constraint system tables.2016-06-30T08:32:53.042621Z 0 [Warning] No existing UUID has been found,

so we assume that this is the first time that this server has been started.

   Generating a new UUID: 3cb1686d-3e9d-11e6-a71f-fcaa14e34b30.2016-06-30T08:32:53.081210Z 0 [Warning] Gtid table is not ready to be used.

Table 'mysql.gtid_executed' cannot be opened.2016-06-30T08:32:53.082538Z 1 [Note] A temporary password is generated for root@localhost: :8

#l!MCYoCNY### Author : Leshami### Blog   : http://www.php.cn/# mysqld_safe --defaults-file=/etc/my3317.cnf &[1] 58252016-06-30T08:11:49.468176Z

mysqld_safe Logging to '/u02/mysqldata3317/ydq4.err'.2016-06-30T08:11:49.480379Z mysqld_safe The file /usr/local/mysql/bin/mysqld

does not exist or is not executable. Please cd to the mysql installation

directory and restart this script from there as follows:

./bin/mysqld_safe&

See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information###如果执行mysqld_safe出现上述错误,可以创建软链。

这个地方有问题,对于安装在非缺省目录时出现了这个问题。# mkdir -pv /usr/local/mysql/bin/# ln -sv /u01/app/mysql/bin/mysqld /usr/local/mysql/bin/mysqld

      "/usr/local/mysql/bin/mysqld" -> "/u01/app/mysql/bin/mysqld"# ./mysqld_safe --defaults-file=/etc/my3317.cnf &[1] 82872016-06-30T08:38:38.455961Z

       mysqld_safe Logging to '/u02/mysqldata3317/ydq4.err'.2016-06-30T08:38:38.471542Z mysqld_safe Starting mysqld daemon with databases from

       /u02/mysqldata3317###配置安全选项# /u01/app/mysql/bin/mysql_secure_installation -P3317 -S /tmp/mysql3317.sock -p

로그인 후 복사

5. 추가 mysql 설치 및 제거 참조


Linux 5에서 MySQL 5.6 설치(RPM 방식)
MySQL 5 제거 Linux에서
Linux에서 소스코드 기반 MySQL 5.6 설치
Linux에서 MySQL 소스코드 정식 버전 설치
MySQL 소스코드 scr.rpm 설치 시 참고사항

mysql 데이터베이스를 설치하려면 이를 수행하기 위한 다양한 옵션이 있습니다. 가장 일반적으로 사용되는 것은 바이너리 설치와 소스 코드 설치입니다. 바이너리 설치 방법에는 rpm 버전과 glibc 버전이 있습니다. rpm 버전은 특정 Linux 버전으로 컴파일됩니다. Linux 버전이 일치하면 설치할 수 있습니다. 예를 들어 RedHat6 또는 RedHat7용 rpm 패키지를 컴파일한 경우 해당 설치를 다운로드하면 됩니다. 특정 glibc 버전을 기반으로 컴파일된 또 다른 바이너리 설치 패키지가 있습니다. 이 기사에서는 주로 glibc 기반의 mysql 설치를 설명합니다.

1. 설치 환경 준비

1

2

3

4

5

###准备安装介质下载地址:http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.12-linux-glibc2.5-x86_64.tar.gz ###或者使用wget方式直接下载对应的版本

# wget http://www.php.cn/# mkdir -pv /u01/app# mkdir -pv /u01/soft# mkdir -pv /u02/mysqldata# cd /u01/soft# wget http://www.php.cn/

# tar -xf mysql-5.7.12-linux-glibc2.5-x86_64.tar.gz# ln -sv /u01/soft/mysql-5.7.12-linux-glibc2.5-x86_64 /u01/app/mysql`/u01/app/mysql' -> `

/u01/soft/mysql-5.7.12-linux-glibc2.5-x86_64'###下面添加mysql用户# useradd -r mysql -s /sbin/nologin# chown -R mysql:mysql /u01/app/mysql

# chown -R mysql:mysql /u02/mysqldata

로그인 후 복사
로그인 후 복사

2. mysql 초기화

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

###使用以下的方式来初始化# cd /u01/app/mysql/bin# ./mysqld --initialize --basedir=/u01/app/mysql --datadir=/u02/mysqldata

--user=mysql --explicit_defaults_for_timestamp2016-06-28T02:18:23.437852Z 0 [Warning] InnoDB: New log files created,LSN=457902016-06-28T02:18:23.718104Z 0

[Warning] InnoDB: Creating foreign key constraint system tables.2016-06-28T02:18:23.866501Z 0 [Warning]

No existing UUID has been found, so we assume that this is

the first time that this

     server has been started. Generating a new UUID: 9731b834-3cd6-11e6-8654-fcaa14e34b30.2016-06-28T02:18:23.896540Z 0

     [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.2016-06-28T02:18:23.898416Z 1 [Note] A

     temporary password is generated for root@localhost: )%%D0pr,mU.Y# ls /u02/mysqldata/auto.cnf client-cert.pem ibdata1 performance_schema sys

ca-key.pem  client-key.pem   ib_logfile0  server-cert.pem

ca.pem      client-req.pem   ib_logfile1  server-key.pem

ca-req.pem  ib_buffer_pool   mysql        server-req.pem###从上面的结果可以看出 mysql 5.7多出了证书相关文件,安全较5.6有较大提升

###mysql_install_db方式初始化数据已经被废弃# ./mysql_install_db --basedir=/u01/app/mysql --datadir=/u02/mysqldata --user=mysql2016-06-28 10:04:56 [WARNING]

mysql_install_db is deprecated.

Please consider switching to mysqld --initialize2016-06-28 10:05:15 [WARNING] The bootstrap log isn't empty:2016-06-28 10:05:15 [WARNING]

2016-06-28T02:04:56.688237Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead2016-06-28T02:04:56.688654Z 0 [Warning]

Changed limits: max_open_files: 1024 (requested 5000)2016-06-28T02:04:56.688657Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)

###如上书提示,mysql_install_db方式初始化数据已经被废弃,建议使用mysqld --initialize,同时也给出了参数限制的警告

# cp /u01/app/mysql/support-files/my-default.cnf /etc/my.cnf# cp /u01/app/mysql/support-files/mysql.server /etc/init.d/mysqld# vim /etc/my.cnf [mysqld]

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

basedir=/u01/app/mysql

datadir=/u02/mysqldata

user=mysql

port=3306# vim /etc/profile.d/mysql.shexport MYSQL_HOME=/u01/app/mysql

export PATH=$PATH:$MYSQL_HOME/bin# source /etc/profile.d/mysql.sh# service mysqld startStarting MySQL.                                       

    [  OK  ]

로그인 후 복사

3. 보안 옵션 구성

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

###使用初始化时得到的密码配置安全选项

# /u01/app/mysql/bin/mysql_secure_installation -p)%%D0pr,mU.Y

mysql_secure_installation: [Warning] Using a password on the command line interface can be insecure.

 

Securing the MySQL server deployment.

 

The existing password for the user account root has expired. Please set a new password.

 

New password:

 

Re-enter new password:

 

VALIDATE PASSWORD PLUGIN can be used to test passwordsand improve security. It checks the strength of passwordand allows the users to set

only those passwords which aresecure enough. Would you like to setup VALIDATE PASSWORD plugin?

 

Press y|Y for Yes, any other key for No: y   ###是否校验密码插件

 

There are three levels of password validation policy:

 

LOW    Length >= 8MEDIUM Length >= 8, numeric, mixed case, and special characters

STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

 

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2  ###设定密码策略等级Using existing password for root.

 

Estimated strength of the password: 100 Change the password for root ? ((Press y|Y for Yes, any other key for No) :

 

 ... skipping.By default, a MySQL installation has an anonymous user,

allowing anyone to log into MySQL without having to have

a user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.

You should remove them before moving into a production

environment.

 

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y  ###是否移除匿名用户

Success.

 

Normally, root should only be allowed to connect from'localhost'. This ensures that someone cannot guess atthe root password from the network.

 

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y  ###是否关闭root远程登陆功能

Success.By default, MySQL comes with a database named 'test' that

anyone can access. This is also intended only for testing,and should be removed before moving into a production

environment.

 

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y  ###是否移除测试数据库

 - Dropping test database...

Success.

 

 - Removing privileges on test database...

Success.

 

Reloading the privilege tables will ensure that all changes

made so far will take effect immediately.

 

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y  ###是否立即生效权限表

Success.All done!

 

###以下为安全增强相关的部分参数

 

mysql> show variables like 'valid%';+--------------------------------------+--------+| Variable_name                        | Value  |

+--------------------------------------+--------+| validate_password_dictionary_file    |        |

| validate_password_length             | 8      |

| validate_password_mixed_case_count   | 1      |

| validate_password_number_count       | 1      |

| validate_password_policy             | STRONG |

| validate_password_special_char_count | 1      |

+--------------------------------------+--------+

로그인 후 복사

4. 동일한 호스트 예

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

###按上面描述的步骤创建其对应的目录及授权后,再执行初始化###使用新的配置文件,如下文本示例使用的为3317# mkdir -pv /u02/mysqldata3317

# chown -R mysql:mysql /u02/mysqldata 3317# grep -v ^# /etc/my3317.cnf[mysqld]

basedir=/u01/app/mysql

datadir=/u02/mysqldata3317

user=mysql

port=3317socket=/tmp/mysql3317.sock# cd /u01/app/mysql/bin# ./mysqld --defaults-file=/etc/my3317.cnf

--initialize --user=mysql --explicit_defaults_for_timestamp

# 2016-06-30T08:32:52.497519Z 0 [Warning] InnoDB: New log files created, LSN=457902016-06-30T08:32:52.852457Z 0

[Warning] InnoDB: Creating foreign key

constraint system tables.2016-06-30T08:32:53.042621Z 0 [Warning] No existing UUID has been found,

so we assume that this is the first time that this server has been started.

   Generating a new UUID: 3cb1686d-3e9d-11e6-a71f-fcaa14e34b30.2016-06-30T08:32:53.081210Z 0 [Warning] Gtid table is not ready to be used.

Table 'mysql.gtid_executed' cannot be opened.2016-06-30T08:32:53.082538Z 1 [Note] A temporary password is generated for root@localhost: :8

#l!MCYoCNY### Author : Leshami### Blog   : http://www.php.cn/# mysqld_safe --defaults-file=/etc/my3317.cnf &[1] 58252016-06-30T08:11:49.468176Z

 

mysqld_safe Logging to '/u02/mysqldata3317/ydq4.err'.2016-06-30T08:11:49.480379Z mysqld_safe The file /usr/local/mysql/bin/mysqld

does not exist or is not executable. Please cd to the mysql installation

directory and restart this script from there as follows:

./bin/mysqld_safe&

See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information###如果执行mysqld_safe出现上述错误,可以创建软链。这个地方有问题,

对于安装在非缺省目录时出现了这个问题。# mkdir -pv /usr/local/mysql/bin/# ln -sv /u01/app/mysql/bin/mysqld /usr/local/mysql/bin/mysqld     

"/usr/local/mysql/bin/mysqld" -> "/u01/app/mysql/bin/mysqld"# ./mysqld_safe --defaults-file=/etc/my3317.cnf &[1] 82872016-06-30T08:38:38.455961Z

mysqld_safe Logging to '/u02/mysqldata3317/ydq4.err'.2016-06-30T08:38:38.471542Z mysqld_safe Starting mysqld daemon with databases from /u02/mysqldata3317

###配置安全选项# /u01/app/mysql/bin/mysql_secure_installation -P3317 -S /tmp/mysql3317.sock -p

로그인 후 복사

5. 추가 mysql 설치 및 제거 참조

Linux 5에서 MySQL 5.6 설치(RPM 방식)
Linux에서 MySQL 5 제거
MySQL 기반 설치 Linux 5.6에서의 소스 코드
Linux에서의 MySQL 소스 코드 정식 버전
MySQL 소스 코드 scr.rpm 설치에 대한 몇 가지 참고 사항

위 내용은 더 많은 관련 내용을 확인하시기 바랍니다. PHP 중국어 웹사이트(www.php.cn)를 주목하세요!

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

<gum> : Bubble Gum Simulator Infinity- 로얄 키를 얻고 사용하는 방법
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
Nordhold : Fusion System, 설명
1 몇 달 전 By 尊渡假赌尊渡假赌尊渡假赌
Mandragora : 마녀 트리의 속삭임 - Grappling Hook 잠금 해제 방법
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
<exp exp> 모호한 : 원정 33- 완벽한 크로마 촉매를 얻는 방법
2 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

MySQL에서 외국 키의 목적을 설명하십시오. MySQL에서 외국 키의 목적을 설명하십시오. Apr 25, 2025 am 12:17 AM

MySQL에서 외국 키의 기능은 테이블 간의 관계를 설정하고 데이터의 일관성과 무결성을 보장하는 것입니다. 외국 키는 참조 무결성 검사 및 계단식 작업을 통해 데이터의 효과를 유지합니다. 성능 최적화에주의를 기울이고 사용할 때 일반적인 오류를 피하십시오.

MySQL 및 Mariadb를 비교하고 대조하십시오. MySQL 및 Mariadb를 비교하고 대조하십시오. Apr 26, 2025 am 12:08 AM

MySQL과 Mariadb의 주요 차이점은 성능, 기능 및 라이센스입니다. 1. MySQL은 Oracle에 의해 개발되었으며 Mariadb는 포크입니다. 2. MariaDB는 높은 하중 환경에서 더 나은 성능을 발휘할 수 있습니다. 3. Mariadb는 더 많은 스토리지 엔진과 기능을 제공합니다. 4.MySQL은 듀얼 라이센스를 채택하고 MariaDB는 완전히 오픈 소스입니다. 선택할 때 기존 인프라, 성능 요구 사항, 기능 요구 사항 및 라이센스 비용을 고려해야합니다.

MySQL : 데이터베이스, phpmyadmin : 관리 인터페이스 MySQL : 데이터베이스, phpmyadmin : 관리 인터페이스 Apr 29, 2025 am 12:44 AM

MySQL 및 Phpmyadmin은 다음 단계를 통해 효과적으로 관리 할 수 ​​있습니다. 1. 데이터베이스 작성 및 삭제 : Phpmyadmin을 클릭하여 완료하십시오. 2. 테이블 관리 : 테이블을 만들고 구조를 수정하고 인덱스를 추가 할 수 있습니다. 3. 데이터 작동 : 삽입, 업데이트, 데이터 삭제 및 SQL 쿼리 실행을 지원합니다. 4. 가져 오기 및 내보내기 데이터 : SQL, CSV, XML 및 기타 형식을 지원합니다. 5. 최적화 및 모니터링 : 최적화 가능한 명령을 사용하여 테이블을 최적화하고 쿼리 분석기 및 모니터링 도구를 사용하여 성능 문제를 해결하십시오.

C에서 DMA 운영을 이해하는 방법? C에서 DMA 운영을 이해하는 방법? Apr 28, 2025 pm 10:09 PM

C의 DMA는 직접 메모리 액세스 기술인 DirectMemoryAccess를 말하며 하드웨어 장치는 CPU 개입없이 데이터를 메모리로 직접 전송할 수 있습니다. 1) DMA 운영은 하드웨어 장치 및 드라이버에 크게 의존하며 구현 방법은 시스템마다 다릅니다. 2) 메모리에 직접 액세스하면 보안 위험이 발생할 수 있으며 코드의 정확성과 보안이 보장되어야합니다. 3) DMA는 성능을 향상시킬 수 있지만 부적절하게 사용하면 시스템 성능이 저하 될 수 있습니다. 실습과 학습을 통해 우리는 DMA 사용 기술을 습득하고 고속 데이터 전송 및 실시간 신호 처리와 같은 시나리오에서 효과를 극대화 할 수 있습니다.

MySQL 테이블에 필드를 추가 및 삭제하는 단계 MySQL 테이블에 필드를 추가 및 삭제하는 단계 Apr 29, 2025 pm 04:15 PM

MySQL에서는 altertabletable_nameaddcolumnnew_columnvarchar (255) 이후에 필드를 추가하여 altertabletable_namedropcolumncolumn_to_drop을 사용하여 필드를 삭제합니다. 필드를 추가 할 때는 쿼리 성능 및 데이터 구조를 최적화하기위한 위치를 지정해야합니다. 필드를 삭제하기 전에 작업이 돌이킬 수 없는지 확인해야합니다. 온라인 DDL, 백업 데이터, 테스트 환경 및 저하 기간을 사용하여 테이블 구조 수정은 성능 최적화 및 모범 사례입니다.

MacOS vs. Linux : 차이점과 유사성 탐색 MacOS vs. Linux : 차이점과 유사성 탐색 Apr 25, 2025 am 12:03 AM

Macosandlinuxbothofferuniquestrengths : macosprovidesauser- 친근한 경험이있는 MacOsprovidesauser 친화적 인 experience, whilleinuxcelsinflexibilityandcommunitysupport.macos, deloadbyApple, issleekinterfacandecosystemintegration, whereaslinux, whereaslinux

C에서 높은 DPI 디스플레이를 처리하는 방법? C에서 높은 DPI 디스플레이를 처리하는 방법? Apr 28, 2025 pm 09:57 PM

C에서 높은 DPI 디스플레이를 처리 할 수 ​​있습니다. 1) DPI 및 스케일링을 이해하고 운영 체제 API를 사용하여 DPI 정보를 얻고 그래픽 출력을 조정하십시오. 2) 크로스 플랫폼 호환성을 처리하고 SDL 또는 QT와 같은 크로스 플랫폼 그래픽 라이브러리를 사용하십시오. 3) 성능 최적화를 수행하고 캐시, 하드웨어 가속 및 세부 사항 수준의 동적 조정을 통해 성능 향상; 4) 흐릿한 텍스트 및 인터페이스 요소와 같은 일반적인 문제를 해결하고 DPI 스케일링을 올바르게 적용하여 해결합니다.

MACOS 시스템에서 MySQL의 설치 단계에 대한 자세한 설명 MACOS 시스템에서 MySQL의 설치 단계에 대한 자세한 설명 Apr 29, 2025 pm 03:36 PM

MacOS에 MySQL을 설치하는 것은 다음 단계를 통해 달성 할 수 있습니다. 1. 1. 명령 /bin/bash-c"$(curl-fsslhttps://raw.githubusercontent.com/homebrew/install/head/install.sh)를 사용하여 Homebrew 설치 ". 2. 홈 브루를 업데이트하고 Brewupdate를 사용하십시오. 3. MySQL을 설치하고 BrewinStallMysQL을 사용하십시오. 4. MySQL 서비스를 시작하고 BrewServicessTartMysql을 사용하십시오. 설치 후 MySQL-U를 사용할 수 있습니다

See all articles