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)他們不使用Supportallsqloperations,限制DatamanipulationThroughViewSwithJoinsOrsubqueries.2)他們canimpactperformance,尤其是withcomplexcomplexclexeriesorlargedatasets.3)

porthusermanagementinmysqliscialforenhancingsEcurityAndsingsmenting效率databaseoperation.1)usecReateusertoAddusers,指定connectionsourcewith@'localhost'or@'%'。

mysqldoes notimposeahardlimitontriggers,butacticalfactorsdeterminetheireffactective:1)serverConfiguration impactactStriggerGermanagement; 2)複雜的TriggerSincreaseSySystemsystem load; 3)largertablesslowtriggerperfermance; 4)highConconcConcrencerCancancancancanceTigrignecentign; 5); 5)

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

通過PHP網頁界面添加MySQL用戶可以使用MySQLi擴展。步驟如下:1.連接MySQL數據庫,使用MySQLi擴展。 2.創建用戶,使用CREATEUSER語句,並使用PASSWORD()函數加密密碼。 3.防止SQL注入,使用mysqli_real_escape_string()函數處理用戶輸入。 4.為新用戶分配權限,使用GRANT語句。

mysql'sblobissuitableForStoringBinaryDataWithInareLationalDatabase,而ilenosqloptionslikemongodb,redis和calablesolutionsolutionsolutionsoluntionsoluntionsolundortionsolunsonstructureddata.blobobobissimplobisslowdeperformberbutslowderformandperformancewithlararengedata;

toaddauserinmysql,使用:createUser'username'@'host'Indessify'password'; there'showtodoitsecurely:1)choosethehostcarecarefullytocon trolaccess.2)setResourcelimitswithoptionslikemax_queries_per_hour.3)usestrong,iniquepasswords.4)Enforcessl/tlsconnectionswith

toAvoidCommonMistakeswithStringDatatatPesInMysQl,CloseStringTypenuances,chosethirtightType,andManageEngencodingAndCollationsEttingSefectery.1)usecharforfixed lengengtrings,varchar forvariable-varchar forbariaible length,andtext/blobforlargerdataa.2 seterters seterters seterters


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

DVWA
Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中

Dreamweaver Mac版
視覺化網頁開發工具

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能