search
HomeDatabaseMysql TutorialLinux MySQL使用rpm安装的后的路径问题

使用rpm包安装MySQL的时候是把各个子目录分别安装到相应目录下了,不存在那个/usr/local/mysql这个目录,并且使用rpm -ql mysql的

使用rpm包安装MySQL的时候是把各个子目录分别安装到相应目录下了,不存在那个/usr/local/mysql这个目录,并且使用rpm -ql mysql的时候会显示“package mysql is not installed”,,具体可以参考一下的一个帖子:

[rpm安装 路径]mysql的rpm包默认安装路径问题

请教高手帮我解决个 问题.由于我装的是RPM包,没能像装源代码文件那样指定路径,我在网上找了很多,都说在/usr/local/mysql路径下,可是我查看它并不存 在,所以请问您我现在要使用mysql提供的API所在的头文件和库函数都被默认安装到哪了? 即那个已经安装的mysql跟目录(包括bin,data,include,lib…)在哪个位置?

tchhyc 2005-12-15 02:27

安装的时候可以指定路径–prefix=/usr/local/mysql

你现在可以用rpm -ql mysql 查看一下

学会用man

man rpm

2519622 2005-12-15 03:14

我用rpm -ql 查询,怎么会提示没有安装呢? 我用mysql都可以正常连接的,怎么会这样?我怎么才能知道装在哪了呢?

或者我卸载它,应该到哪个目录呢?

tchhyc 2005-12-15 04:50

rpm -qa|grep mysql 看看

如果没有说明你不是用rpm安装mysql得

2519622 2005-12-15 06:08

谢谢你的答复啊!

我用rpm -qa | grep -i mysql查到了,没错,我装好了那些rpm包,也能正常通信,现在我就是找不到那个mysql根目录(包括bin,data,include,lib…),我主要想知道那些mysql提供的API都在哪!

怎么办呢?

tchhyc 2005-12-15 06:16

查找bin include lib

find / -name mysql.h -print

find / -name libmysqlclient.so -print

find / -name mysql -print

查看data

mysql>show variables;   //datadir

2519622 2005-12-15 06:49

找到了!太感谢你了!

find指令还挺好用的!

看来rpm包是把各个子目录分别安装到相应目录下了,不存在那个根目录.

[来源]?tid=669043&page=1#pid4526427

由上面的帖子可以知道,用RPM进行安装的时候,MySQL下的子目录被分散开,分别放在了以下几个目录下:
(RHEL5.4 RPM 安装MySQL)
[root@rhel5 ~]# find / -name mysql -print
/etc/logrotate.d/mysql
/etc/rc.d/init.d/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/var/lock/subsys/mysql
/usr/lib/mysql
/usr/include/mysql
/usr/share/mysql
/usr/bin/mysql
而 data默认放在:/var/lib/mysql

mysql默认安装在了:/usr/share/mysql中

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL BLOB : are there any limits?MySQL BLOB : are there any limits?May 08, 2025 am 12:22 AM

MySQLBLOBshavelimits:TINYBLOB(255bytes),BLOB(65,535bytes),MEDIUMBLOB(16,777,215bytes),andLONGBLOB(4,294,967,295bytes).TouseBLOBseffectively:1)ConsiderperformanceimpactsandstorelargeBLOBsexternally;2)Managebackupsandreplicationcarefully;3)Usepathsinst

MySQL : What are the best tools to automate users creation?MySQL : What are the best tools to automate users creation?May 08, 2025 am 12:22 AM

The best tools and technologies for automating the creation of users in MySQL include: 1. MySQLWorkbench, suitable for small to medium-sized environments, easy to use but high resource consumption; 2. Ansible, suitable for multi-server environments, simple but steep learning curve; 3. Custom Python scripts, flexible but need to ensure script security; 4. Puppet and Chef, suitable for large-scale environments, complex but scalable. Scale, learning curve and integration needs should be considered when choosing.

MySQL: Can I search inside a blob?MySQL: Can I search inside a blob?May 08, 2025 am 12:20 AM

Yes,youcansearchinsideaBLOBinMySQLusingspecifictechniques.1)ConverttheBLOBtoaUTF-8stringwithCONVERTfunctionandsearchusingLIKE.2)ForcompressedBLOBs,useUNCOMPRESSbeforeconversion.3)Considerperformanceimpactsanddataencoding.4)Forcomplexdata,externalproc

MySQL String Data Types: A Comprehensive GuideMySQL String Data Types: A Comprehensive GuideMay 08, 2025 am 12:14 AM

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,idealforconsistentlengthdatalikecountrycodes;2)VARCHARforvariable-lengthstrings,suitableforfieldslikenames;3)TEXTtypesforlargertext,goodforblogpostsbutcanimpactperformance;4)BINARYandVARB

Mastering MySQL BLOBs: A Step-by-Step TutorialMastering MySQL BLOBs: A Step-by-Step TutorialMay 08, 2025 am 12:01 AM

TomasterMySQLBLOBs,followthesesteps:1)ChoosetheappropriateBLOBtype(TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB)basedondatasize.2)InsertdatausingLOAD_FILEforefficiency.3)Storefilereferencesinsteadoffilestoimproveperformance.4)UseDUMPFILEtoretrieveandsaveBLOBsco

BLOB Data Type in MySQL: A Detailed Overview for DevelopersBLOB Data Type in MySQL: A Detailed Overview for DevelopersMay 07, 2025 pm 05:41 PM

BlobdatatypesinmysqlareusedforvoringLargebinarydatalikeImagesoraudio.1) Useblobtypes (tinyblobtolongblob) Basedondatasizeneeds. 2) Storeblobsin Perplate Petooptimize Performance.3) ConsidersxterNal Storage Forel Blob Romana DatabasesizerIndimprovebackupupe

How to Add Users to MySQL from the Command LineHow to Add Users to MySQL from the Command LineMay 07, 2025 pm 05:01 PM

ToadduserstoMySQLfromthecommandline,loginasroot,thenuseCREATEUSER'username'@'host'IDENTIFIEDBY'password';tocreateanewuser.GrantpermissionswithGRANTALLPRIVILEGESONdatabase.*TO'username'@'host';anduseFLUSHPRIVILEGES;toapplychanges.Alwaysusestrongpasswo

What Are the Different String Data Types in MySQL? A Detailed OverviewWhat Are the Different String Data Types in MySQL? A Detailed OverviewMay 07, 2025 pm 03:33 PM

MySQLofferseightstringdatatypes:CHAR,VARCHAR,BINARY,VARBINARY,BLOB,TEXT,ENUM,andSET.1)CHARisfixed-length,idealforconsistentdatalikecountrycodes.2)VARCHARisvariable-length,efficientforvaryingdatalikenames.3)BINARYandVARBINARYstorebinarydata,similartoC

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools