习惯了二进制安装MySQL,今天心血来潮想装个RPM包的MySQL玩玩,没想到一装还真碰到了点问题,下面把碰到的问题分享一下
首先去官网下载安装包,地址是:http://downloads.mysql.com/archives/community/
根据自己的系统版本和平台选择要安装的包,我的测试机是32 bit的 RHEL 5.3
我选择的是5.0.96,挺老的版本了,需要下载一个server包和一个client包,分别为:
MySQL-server-community-5.0.96-1.rhel5.i386
MySQL-client-community-5.0.96-1.rhel5.i386
把这2个包放到服务器/opt目录下
一、安装MySQL服务器
[root@bak ~]# rpm -ivh /opt/MySQL-server-community-5.0.96-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-server-community ########################################### [100%]
141017 15:36:11 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set
Installation of system tables failed!
Examine the logs in /data/mysql/mysql_3306/data for more information.
You can try to start the mysqld daemon with:
/usr/local/mysql/bin/mysqld --skip-grant &
and use the command line tool
/usr/local/mysql/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/local/mysql/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /data/mysql/mysql_3306/data that may be helpful.
The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
Starting MySQL[ OK ] --mysqld进程顺利启动
Giving mysqld 2 seconds to start
[root@bak ~]# ps -ef|grep mysql
root 11883 11838 0 15:28 pts/2 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
mysql 12584 11883 0 15:28 pts/2 00:00:01 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql/mysql_3306/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql
--log-error=/data/mysql/mysql_3306/data/error.log --open-files-limit=8192 --pid-file=/data/mysql/mysql_3306/data/bak.pid --socket=/tmp/mysql.sock --port=3306
root 13390 11838 0 15:36 pts/2 00:00:00 grep mysql
[root@bak ~]#
安装完包以后会自动去启动mysqld进程,并寻找/etc/my.cnf文件(如果有的话)读取配置,显然我这里原来是有一个的,这是为我的5.5.39的二进制MySQL配置的,而这里已经被读取到了,但我现在装的是5.0.x的RPM版本,使用这个配置文件显然是不适合的,因此先停止mysqld进程,使用自带的配置文件重新去启动服务器进程
--停止mysqld进程
[root@bak ~]# service mysql stop
Shutting down MySQL.141017 15:42:12 mysqld_safe mysqld from pid file /data/mysql/mysql_3306/data/bak.pid ended
[ OK ]
[1]+ Done mysqld_safe
--也可以这样停止mysqld进程
[root@bak ~]# /etc/init.d/mysql stop
Shutting down MySQL. [ OK ]
--把原来的配置文件改名,复制5.0.96自带的模板配置文件到/etc/my.cnf
[root@bak ~]# mv /etc/my.cnf /etc/my.cnf-5.5.39
[root@bak ~]# cd /usr/share/mysql
[root@bak mysql]# ll
total 1152
-rwxr-xr-x 1 root root 1153 Mar 3 2012 binary-configure
drwxr-xr-x 2 root root 4096 Oct 17 15:36 charsets
drwxr-xr-x 2 root root 4096 Oct 17 15:36 czech
drwxr-xr-x 2 root root 4096 Oct 17 15:36 danish
drwxr-xr-x 2 root root 4096 Oct 17 15:36 dutch
drwxr-xr-x 2 root root 4096 Oct 17 15:36 english
-rwxr-xr-x 1 root root 346791 Mar 3 2012 errmsg.txt
drwxr-xr-x 2 root root 4096 Oct 17 15:36 estonian
-rwxr-xr-x 1 root root 548013 Mar 3 2012 fill_help_tables.sql
drwxr-xr-x 2 root root 4096 Oct 17 15:36 french
drwxr-xr-x 2 root root 4096 Oct 17 15:36 german
drwxr-xr-x 2 root root 4096 Oct 17 15:36 greek
drwxr-xr-x 2 root root 4096 Oct 17 15:36 hungarian
drwxr-xr-x 2 root root 4096 Oct 17 15:36 italian
drwxr-xr-x 2 root root 4096 Oct 17 15:36 japanese
drwxr-xr-x 2 root root 4096 Oct 17 15:36 korean
-rwxr-xr-x 1 root root 5726 Mar 3 2012 mi_test_all
-rwxr-xr-x 1 root root 1517 Mar 3 2012 mi_test_all.res
-rwxr-xr-x 1 root root 4972 Mar 3 2012 my-huge.cnf
-rwxr-xr-x 1 root root 20970 Mar 3 2012 my-innodb-heavy-4G.cnf
-rwxr-xr-x 1 root root 4948 Mar 3 2012 my-large.cnf
-rwxr-xr-x 1 root root 4955 Mar 3 2012 my-medium.cnf
-rwxr-xr-x 1 root root 2526 Mar 3 2012 my-small.cnf
-rwxr-xr-x 1 root root 1061 Mar 3 2012 mysqld_multi.server
-rwxr-xr-x 1 root root 33106 Mar 3 2012 mysql_fix_privilege_tables.sql
-rwxr-xr-x 1 root root 789 Mar 3 2012 mysql-log-rotate
-rwxr-xr-x 1 root root 11948 Mar 3 2012 mysql.server
-rwxr-xr-x 1 root root 2570 Mar 3 2012 mysql_system_tables_data.sql
-rwxr-xr-x 1 root root 12835 Mar 3 2012 mysql_system_tables.sql
-rwxr-xr-x 1 root root 10371 Mar 3 2012 mysql_test_data_timezone.sql
-rwxr-xr-x 1 root root 589 Mar 3 2012 ndb-config-2-node.ini
-rwxr-xr-x 1 root root 6295 Mar 3 2012 ndb_size.tmpl
drwxr-xr-x 2 root root 4096 Oct 17 15:36 norwegian
drwxr-xr-x 2 root root 4096 Oct 17 15:36 norwegian-ny
drwxr-xr-x 2 root root 4096 Oct 17 15:36 polish
drwxr-xr-x 2 root root 4096 Oct 17 15:36 portuguese
drwxr-xr-x 2 root root 4096 Oct 17 15:36 romanian
drwxr-xr-x 2 root root 4096 Oct 17 15:36 russian
drwxr-xr-x 3 root root 4096 Oct 17 15:36 SELinux
drwxr-xr-x 2 root root 4096 Oct 17 15:36 serbian
drwxr-xr-x 2 root root 4096 Oct 17 15:36 slovak
drwxr-xr-x 2 root root 4096 Oct 17 15:36 spanish
drwxr-xr-x 2 root root 4096 Oct 17 15:36 swedish
drwxr-xr-x 2 root root 4096 Oct 17 15:36 ukrainian
[root@bak mysql]# cp my-medium.cnf /etc/my.cnf
--重新启动mysqld进程
[root@bak ~]# /etc/init.d/mysql start
Starting MySQL. [ OK ]
[root@bak ~]# ps -ef|grep mysql
root 13457 1 0 15:47 pts/2 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/bak.pid
mysql 13487 13457 0 15:47 pts/2 00:00:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/bak.pid --skip-external-locking --port=3306 --socket=/var/lib/mysql/mysql.sock
root 13505 11838 0 15:47 pts/2 00:00:00 grep mysql
[root@bak ~]#
再次查看,现在使用的配置文件已经为默认配置的值了(可与之前的进程捕捉到的路径做对比),RPM包安装MySQL默认的data路径是/var/lib/mysql,bin log和error log默认也都是放在这里的
二、安装MySQL客户端
由于之前已经装了5.5.39的二进制MySQL,如果不安装5.0.96的客户端,而直接使用原来的客户端也是可以的,那么就是通过5.5.39的客户端去连接5.0.96的服务器
[root@bak ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.96-community-log MySQL Community Edition (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.5.39, for linux2.6 (i686) using readline 5.1
Connection id: 1
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.96-community-log MySQL Community Edition (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 1 min 5 sec
Threads: 1 Questions: 4 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.062
--------------
mysql>
连接很顺利,红色部分清楚地显示了客户端和服务器端的版本号,如果在没有安装过MySQL客户端的系统上执行mysql,会提示找不到命令,我的目的是想安装5.0.96自己的客户端,然后连接到服务器
[root@bak ~]# rpm -ivh /opt/MySQL-client-community-5.0.96-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-client-community ########################################### [100%]
[root@bak ~]#
为了不让原来的版本对5.0.39产生干扰,我把原来属于5.5.39的软链先删掉
[root@bak ~]# cd /usr/local
[root@bak local]# ll
total 72
drwxr-xr-x 2 mysql 502 4096 Aug 25 11:39 bin
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 etc
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 games
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 include
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 lib
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 libexec
lrwxrwxrwx 1 root root 38 Oct 17 14:56 mysql -> /opt/mysql/mysql-5.5.39-linux2.6-i686/
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 sbin
drwxr-xr-x 5 mysql 502 4096 Aug 25 11:39 share
drwxr-xr-x 2 mysql 502 4096 Sep 23 20:34 src
[root@bak local]# unlink mysql
[root@bak local]# ll
total 72
drwxr-xr-x 2 mysql 502 4096 Aug 25 11:39 bin
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 etc
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 games
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 include
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 lib
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 libexec
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 sbin
drwxr-xr-x 5 mysql 502 4096 Aug 25 11:39 share
drwxr-xr-x 2 mysql 502 4096 Sep 23 20:34 src
[root@bak local]#
原来的/usr/local/mysql/bin指向的位置是/opt/mysql/mysql-5.5.39-linux2.6-i686/mysql/bin的,那么按理说,现在已经取消了该路径,当我们执行mysql客户端命令的时候,应该是使用5.0.96的客户端程序去连接服务器,但事实却非如此
[root@bak local]# mysql
-bash: /usr/local/mysql/bin/mysql: No such file or directory
可以看到,当软链取消后,再次执行mysql命令,提示没有这个目录了,因为这个目录就是刚才软链的目录,已经unlink掉了,肯定是没有的了,那不是还有/usr/bin目录吗?为什么5.0.96自己的bin目录不能被利用起来?
开始以为重启mysqld进程可以改变这一窘境,可并没有起作用
[root@bak local]# service mysql stop
Shutting down MySQL. [ OK ]
[root@bak local]# service mysql start
Starting MySQL. [ OK ]
[root@bak local]# mysql
-bash: /usr/local/mysql/bin/mysql: No such file or directory
尝试退出session,重新连接到服务器
[root@bak local]# exit
断开session……
Last login: Fri Oct 17 15:26:24 2014 from 192.168.1.100 --重新连接上来
[root@bak ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.96-community-log MySQL Community Edition (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \s
--------------
mysql Ver 14.12 Distrib 5.0.96, for pc-linux-gnu (i686) using readline 5.1 --不再报错,已经用5.0.96的客户端程序连到服务器了
Connection id: 1
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.96-community-log MySQL Community Edition (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 1 min 55 sec
Threads: 1 Questions: 4 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.035
--------------
mysql>
开始我理解是,删除软链,也许要重新退出session才能生效,但事实上是环境变量的问题。由于之前已经有5.5.39版本,bin路径是 /usr/local/mysql/bin/mysql ,后来安装了 5.0.96,bin路径指向 /usr/bin/mysql,虽然之前把 /usr/local/mysql 软链去掉了,环境变量认为mysql还是要读取
/usr/local/mysql/bin/mysql,而不会去读取最新的 /usr/bin/mysql,所以报路径错误,退出session以后,等于是对环境变量的路径做了一次更新,去读取/usr/bin/mysql
那么假设我现在又想用5.5.39客户端程序去连5.0.96服务器呢?是不是简单地加上软链,然后退出session就可以了呢?我们来看一下
mysql> exit
Bye
[root@bak ~]# cd /usr/local
[root@bak local]# ln -s /opt/mysql/mysql-5.5.39-linux2.6-i686/ mysql
[root@bak local]# ll
total 72
drwxr-xr-x 2 mysql 502 4096 Aug 25 11:39 bin
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 etc
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 games
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 include
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 lib
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 libexec
lrwxrwxrwx 1 root root 38 Oct 17 16:14 mysql -> /opt/mysql/mysql-5.5.39-linux2.6-i686/
drwxr-xr-x 2 mysql 502 4096 Aug 8 2008 sbin
drwxr-xr-x 5 mysql 502 4096 Aug 25 11:39 share
drwxr-xr-x 2 mysql 502 4096 Sep 23 20:34 src
[root@bak local]# exit
断开session……
Last login: Fri Oct 17 16:07:04 2014 from 192.168.1.100 --重新连上服务器
[root@bak ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.96-community-log MySQL Community Edition (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \s
--------------
mysql Ver 14.12 Distrib 5.0.96, for pc-linux-gnu (i686) using readline 5.1
Connection id: 3
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.96-community-log MySQL Community Edition (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 9 min 17 sec
Threads: 1 Questions: 12 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.022
--------------
mysql>
是不是觉得很奇怪?这次重新添加了软链指向了5.5.39的bin路径,也退出了sesssion更新环境变量,怎么mysql还是去连了5.0.96的bin路径里的mysql客户端呢?再来看一下PATH环境变量的设置
mysql> exit
Bye
[root@bak ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin:/root/bin
[root@bak ~]#
发现/usr/bin是在/usr/local/mysql这个路径之前的,这里做一个假设,系统先读到/usr/bin之后就直接运行了5.0.96的mysql客户端,而不管之后的路径了,所以即便推出session重新连接,始终都是先进入/usr/bin读取mysql。来验证一下,把这2个位置对调一下
[root@bak ~]# export PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/local/mysql/bin:/usr/bin:/root/bin
[root@bak ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.96-community-log MySQL Community Edition (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.5.39, for linux2.6 (i686) using readline 5.1 --又以5.5.39的客户端连接到5.0.96的服务器了
Connection id: 8
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.96-community-log MySQL Community Edition (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 21 min 15 sec
Threads: 1 Questions: 32 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.025
--------------
mysql>
不过这样做并没有固化到环境变量中,退出session以后再连上,PATH又变成之前的值了,就算source .bash_profile也是如此,来看一下root用户的.bash_profile文件
[root@bak ~]# cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
[root@bak ~]#
这里面没有显示指定PATH的具体值是哪些,只是用$调用了一下PATH变量,既然这样,我们就把期望的值写进去,然后就可以做到固化PATH路径的绝对值了
[root@bak ~]# vi .bash_profile
把$PATH改为
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/local/mysql/bin:/usr/bin:/root/bin
[root@bak ~]# . .bash_profile --使环境变量在当前session生效
这样,即使退出session也不会丢失给PATH设置的值了,当我们需要哪个版本的客户端时,就手动调整一下PATH的路径,让目标路径放在前面供系统查找即可

저장된 절차는 성능을 향상시키고 복잡한 작업을 단순화하기 위해 MySQL에서 사전 컴파일 된 SQL 문입니다. 1. 성능 향상 : 첫 번째 편집 후 후속 통화를 다시 컴파일 할 필요가 없습니다. 2. 보안 향상 : 권한 제어를 통해 데이터 테이블 액세스를 제한합니다. 3. 복잡한 작업 단순화 : 여러 SQL 문을 결합하여 응용 프로그램 계층 로직을 단순화합니다.

MySQL 쿼리 캐시의 작동 원리는 선택 쿼리 결과를 저장하는 것이며 동일한 쿼리가 다시 실행되면 캐시 된 결과가 직접 반환됩니다. 1) 쿼리 캐시는 데이터베이스 읽기 성능을 향상시키고 해시 값을 통해 캐시 된 결과를 찾습니다. 2) MySQL 구성 파일에서 간단한 구성, query_cache_type 및 query_cache_size를 설정합니다. 3) SQL_NO_CACHE 키워드를 사용하여 특정 쿼리의 캐시를 비활성화하십시오. 4) 고주파 업데이트 환경에서 쿼리 캐시는 성능 병목 현상을 유발할 수 있으며 매개 변수의 모니터링 및 조정을 통해 사용하기 위해 최적화해야합니다.

MySQL이 다양한 프로젝트에서 널리 사용되는 이유에는 다음이 포함됩니다. 1. 고성능 및 확장 성, 여러 스토리지 엔진을 지원합니다. 2. 사용 및 유지 관리, 간단한 구성 및 풍부한 도구; 3. 많은 지역 사회 및 타사 도구 지원을 유치하는 풍부한 생태계; 4. 여러 운영 체제에 적합한 크로스 플랫폼 지원.

MySQL 데이터베이스를 업그레이드하는 단계에는 다음이 포함됩니다. 1. 데이터베이스 백업, 2. 현재 MySQL 서비스 중지, 3. 새 버전의 MySQL 설치, 4. 새 버전의 MySQL 서비스 시작, 5. 데이터베이스 복구. 업그레이드 프로세스 중에 호환성 문제가 필요하며 Perconatoolkit과 같은 고급 도구를 테스트 및 최적화에 사용할 수 있습니다.

MySQL 백업 정책에는 논리 백업, 물리적 백업, 증분 백업, 복제 기반 백업 및 클라우드 백업이 포함됩니다. 1. 논리 백업은 MySQLDump를 사용하여 데이터베이스 구조 및 데이터를 내보내며 소규모 데이터베이스 및 버전 마이그레이션에 적합합니다. 2. 물리적 백업은 데이터 파일을 복사하여 빠르고 포괄적이지만 데이터베이스 일관성이 필요합니다. 3. 증분 백업은 이진 로깅을 사용하여 변경 사항을 기록합니다. 이는 큰 데이터베이스에 적합합니다. 4. 복제 기반 백업은 서버에서 백업하여 생산 시스템에 미치는 영향을 줄입니다. 5. AmazonRDS와 같은 클라우드 백업은 자동화 솔루션을 제공하지만 비용과 제어를 고려해야합니다. 정책을 선택할 때 데이터베이스 크기, 가동 중지 시간 허용 오차, 복구 시간 및 복구 지점 목표를 고려해야합니다.

mysqlclusteringenhancesdatabaserobustness andscalabilitydaturedingdataacrossmultiplenodes.itusesthendbenginefordatareplicationandfaulttolerance, highavailability를 보장합니다

MySQL에서 데이터베이스 스키마 설계 최적화는 다음 단계를 통해 성능을 향상시킬 수 있습니다. 1. 인덱스 최적화 : 공통 쿼리 열에서 인덱스 생성, 쿼리의 오버 헤드 균형 및 업데이트 삽입. 2. 표 구조 최적화 : 정규화 또는 정상화를 통한 데이터 중복성을 줄이고 액세스 효율을 향상시킵니다. 3. 데이터 유형 선택 : 스토리지 공간을 줄이기 위해 Varchar 대신 Int와 같은 적절한 데이터 유형을 사용하십시오. 4. 분할 및 하위 테이블 : 대량 데이터 볼륨의 경우 파티션 및 하위 테이블을 사용하여 데이터를 분산시켜 쿼리 및 유지 보수 효율성을 향상시킵니다.

tooptimizemysqlperformance, followthesesteps : 1) 구현 properIndexingToSpeedUpqueries, 2) useExplaintoAnalyzeanDoptimizeQueryPerformance, 3) AdvertServerConfigUrationSettingstingslikeInnodb_buffer_pool_sizeandmax_connections, 4) uspartOflEtOflEtOflestoI


핫 AI 도구

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

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

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

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

인기 기사

뜨거운 도구

mPDF
mPDF는 UTF-8로 인코딩된 HTML에서 PDF 파일을 생성할 수 있는 PHP 라이브러리입니다. 원저자인 Ian Back은 자신의 웹 사이트에서 "즉시" PDF 파일을 출력하고 다양한 언어를 처리하기 위해 mPDF를 작성했습니다. HTML2FPDF와 같은 원본 스크립트보다 유니코드 글꼴을 사용할 때 속도가 느리고 더 큰 파일을 생성하지만 CSS 스타일 등을 지원하고 많은 개선 사항이 있습니다. RTL(아랍어, 히브리어), CJK(중국어, 일본어, 한국어)를 포함한 거의 모든 언어를 지원합니다. 중첩된 블록 수준 요소(예: P, DIV)를 지원합니다.

안전한 시험 브라우저
안전한 시험 브라우저는 온라인 시험을 안전하게 치르기 위한 보안 브라우저 환경입니다. 이 소프트웨어는 모든 컴퓨터를 안전한 워크스테이션으로 바꿔줍니다. 이는 모든 유틸리티에 대한 액세스를 제어하고 학생들이 승인되지 않은 리소스를 사용하는 것을 방지합니다.

맨티스BT
Mantis는 제품 결함 추적을 돕기 위해 설계된 배포하기 쉬운 웹 기반 결함 추적 도구입니다. PHP, MySQL 및 웹 서버가 필요합니다. 데모 및 호스팅 서비스를 확인해 보세요.

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

VSCode Windows 64비트 다운로드
Microsoft에서 출시한 강력한 무료 IDE 편집기
