Google Docs版本在此,欢迎参与完善文档 https://docs.google.com/document/d/14ed599Rn9yQvt_V_Bi8uKWBfPmtwZ3la73-KIpWf4_M/edit 发现Google Docs没法像Zoho那样把文档嵌入HTML,所以只好粘贴一份在这里。 编译安装 安装Apache依赖库PCRE 8.3: 解压源码,
Google Docs版本在此,欢迎参与完善文档
https://docs.google.com/document/d/14ed599Rn9yQvt_V_Bi8uKWBfPmtwZ3la73-KIpWf4_M/edit
发现Google Docs没法像Zoho那样把文档嵌入HTML,所以只好粘贴一份在这里。
编译安装
安装Apache依赖库PCRE 8.3:
- 解压源码,运行命令
$./configure –prefix=/data/cherrotluo/local/pcre - $make
- $make install
安装Apache Httpd 2.4:
- 下载apache httpd源码解压,然后下载apr和apr-utils分别放置在httpd源码目录的srclib/apr和srclib/apr-util目录。
- 执行命令
$./configure –prefix=/data/cherrotluo/local/httpd –with-included-apr –with-pcre=/data/cherrotluo/local/pcre - $make
- $make install
安装MySQL 5.5.25a:
- 安装cmake。MySQL 5.5 使用cmake代替configure脚本配置安装过程。所以需要实现安装或编译安装cmake,很简单,不再赘述。
- 使用cmake配置MySQL。参考mysql官方文档:http://forge.mysql.com/wiki/CMake#Very_quick_how-to-build
和这篇教程: http://www.cnblogs.com/church/archive/2012/07/17/2595749.html
最终我的配置命令是:
$mkdir build-cherrot
$cd build-cherrot
$/cmake \
#安装目录
-DCMAKE_INSTALL_PREFIX=/data/cherrotluo/local/mysql \
#数据库存放目录
-DMYSQL_DATADIR=~/data/mysql \
#Unix Socket文件路径
-DMYSQL_UNIX_ADDR=~/data/mysql/mysql.socket \
#安装MYISAM存储引擎
-DWITH_MYISAM_STORAGE_ENGINE=1 \
#安装InnoBase存储引擎
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
#安装Archieve存储引擎
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
#安装BlackHole存储引擎
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
#安装数据库分区存储引擎
-DWITH_PARTITION_STORAGE_ENGINE=1 \
#允许从本地导入数据
-DENABLED_LOCAL_INFILE=1 \
#使用MySQL源码中自带的ZLIB库。我的系统Zlib库版本较老,如果没有这一句,虽然可以通过cmake,但make到56%时会出错误:storage/innobase/page/page0zip.c:2968: error: `Z_BLOCK’ undeclared (first use in this function) (参见: http://bugs.mysql.com/bug.php?id=65856)
-DWITH_ZLIB=bundled \
#使用系统READLINE库实现快捷键功能
-DWITH_READLINE=system \
#使用系统自带SSL库
-DWITH_SSL=system \
#使用UTF-8字符集
-DDEFAULT_CHARSET=utf8 \
#校验字符集
-DDEFAULT_COLLATION=utf8_general_ci \
#安装全部扩展字符集
-DEXTRA_CHARSETS=all \
#设定监听端口
-DMYSQL_TCP_PORT=8600 ..
安装MySQL 5.1
因为机器上已经有一个mysql 5.0了,和5.5大大的不兼容(https://discussions.apple.com/thread/2698727),于是退回5.1重新编译
- ./configure –prefix=/data/cherrotluo/local/mysql5.1 –localstatedir=/data/cherrotluo/data/mysql –enable-local-infile –with-charset=utf8 –with-collation=utf8_general_ci –with-extra-charsets=all ?–with-unix-socket-path=/data/cherrotluo/data/mysql/mysql.socket –with-tcp-port=8600 ?–with-mysqld-user=cherrotluo –with-zlib-dir=bundled
- make; make install
- 初始化数据库:
./bin/mysql_install_db –datadir=/data/cherrotluo/data/mysql - 使用自己的配置文件启动mysqld:
./bin/mysqld_safe –defaults-file=~/source/mysql-5.1.63/support-files/my-large.cnf - 修改密码:
mysqladmin -u root -h 127.0.0.1 password ‘new-password’ #使用localhost代替127.0.0.1时还需要使用 -S 指定socket路径
安装PHP5.4.5
- ./configure –prefix=/data/cherrotluo/local/php –with-apxs2=/data/cherrotluo/local/httpd… –with-mysql=/data/cherrot/local/mysql5.1/ –with-mysql-sock=/data/cherrotluo/data/mysql/ –with-pdo-mysql=/data/cherrot/local/mysql5.1/
- make; make install
多实例运行
多实例运行主要涉及到是MySQL多实例和Apache多实例。
MySQL多实例运行
$mysqld_safe –defaults-file=~/data/mysql/my.cnf
$mysql -h localhost -P 8600 -S ~/data/mysql/mysql.socket -u root -p
#或者 $mysql -h 127.0.0.1 -P 8600 -u root -p, 下面命令同理可以替换
$mysqladmin -h localhost -P 8600 -S ~/data/mysql/mysql.socket -u root -p shutdown
默认开启了匿名用户,因此只能使用root或者不指定用户密码匿名登录,使用其他用户登录会提示Access Denied。删除匿名用户后就可以使用其他用户登录mysql了。
编辑配置文件(my.cnf),将no-auto-rehash改为auto-rehash以支持自动补全。客户端连接数据库时多加一个 –auto-rehash 参数就可以TAB自动补全了,但只能补全表、列名。
原文地址:编译配置LAMP环境, 感谢原作者分享。

mysqlviewshavelimitations : 1) 그들은 upportallsqloperations, datamanipulation throughviewswithjoinsorbqueries를 제한하지 않습니다

적절한 usermanagementInmysqliscrucialforenhancingsecurityandensuringfefficientDatabaseOperation.1) USECREATEUSERTOWDDUSERS,@'localHost'or@'%'.

mysqldoes notimposeahardlimitontriggers, butpracticalfactorsdeteirefectiveuse : 1) ServerConfigurationimpactStriggerManagement; 2) 복잡한 트리거 스케일 스케일 사이드로드; 3) argertableSlowtriggerTriggerPerformance; 4) High ConconcercencyCancaUspriggerContention; 5) m

예, It 'safetostoreBlobdatainmysql, butconsidertheStefactors : 1) StoragesPace : BlobScanconSumeSignificantspace, 잠재적으로 증가하는 CostsandSlownperformance

PHP 웹 인터페이스를 통해 MySQL 사용자를 추가하면 MySQLI 확장 기능을 사용할 수 있습니다. 단계는 다음과 같습니다. 1. MySQL 데이터베이스에 연결하고 MySQLI 확장자를 사용하십시오. 2. 사용자를 생성하고 CreateUser 문을 사용하고 Password () 함수를 사용하여 암호를 암호화하십시오. 3. SQL 주입 방지 및 MySQLI_REAL_ESCAPE_STRING () 함수를 사용하여 사용자 입력을 처리하십시오. 4. 새 사용자에게 권한을 할당하고 보조금 명세서를 사용하십시오.

mysql'sblobissuilableforstoringbinarydatawithinareldatabase, whilenosqloptionslikemongodb, redis, and cassandraofferflexible, scalablesolutionsforunstuctureddata.blobissimplerbutcanslowwownperformance를 사용하는 것들보업 betterscal randaysand

TOADDAUSERINMYSQL, 사용 : CreateUser'UserName '@'host'IdentifiedBy'Password '; 여기서'showTodoitseciRely : 1) ChoosetheHostCareLyTocon trolaccess.2) setResourcelimitswithOptionslikemax_queries_per_hour.3) Usestrong, iriquepasswords.4) enforcessl/tlsconnectionswith

toavoidcommonmistakeswithstringdatatypesinmysql, stroundStringTypenuances, chooseTherightType, andManageEncodingAndCollationSettingSefectively.1) usecharforfixed-lengthstrings, varcharvariable-length, andtext/blobforlargerdata.2) setcarcatter


핫 AI 도구

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

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

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

Clothoff.io
AI 옷 제거제

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

인기 기사

뜨거운 도구

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

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

드림위버 CS6
시각적 웹 개발 도구

ZendStudio 13.5.1 맥
강력한 PHP 통합 개발 환경

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