Linux 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中

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The RPM (RedHatPackageManager) tool in Linux systems is a powerful tool for installing, upgrading, uninstalling and managing system software packages. It is a commonly used software package management tool in RedHatLinux systems and is also used by many other Linux distributions. The role of the RPM tool is very important. It allows system administrators and users to easily manage software packages on the system. Through RPM, users can easily install new software packages and upgrade existing software

In Linux systems, RPM (RedHatPackageManager) is a common software package management tool used to install, upgrade and delete software packages. Sometimes we need to find the storage path of an installed RPM file for search or other operations. The following will introduce how to find the storage path of the RPM file in the Linux system, and provide specific code examples. First, we can use the rpm command to find the installed RPM package and its storage path. Open

Linux rpm is generally stored in the "/usr/local" or "/usr/bin" directory by default; the "/usr/local" directory is the "/usr" directory provided to general users, where general application software is installed, and The "/usr/bin" directory also houses many applications.

1. Download 4 rpm packages mysql-community-client-5.7.26-1.el7.x86_64.rpmmysql-community-common-5.7.26-1.el7.x86_64.rpmmysql-community-libs-5.7.26-1 .el7.x86_64.rpmmysql-community-server-5.7.26-1.el7.x86_64.rpm If you want to use Thunder to download, you must first find the corresponding rpm download path. First, open the mysql official website in the browser: In the opened interface, press the keyboard f12 to open developer tools

Rpm package management function fully understands the function of software package management: packaging the components of the compiled program into one or several package files, in order to facilitate the installation, upgrade, uninstallation, query, verification, and database of the program package maintain. Let's take a look at the analysis of RPM package management. Rpm packages have great applications in redhat and S.U.S.E. Next, we will do some detailed functional analysis on the management of rpm packages in the centos system. Using yum (rhel series), it can be automatically installed during installation. Resolve dependencies drpm package naming format: name-VERSION-release.arch.rpmVERSION: major.minor.releaseMajor

"Standard paths and code examples for RPM package storage in Linux systems" In Linux systems, RPM (RedHatPackageManager) packages are a standard format for software package management. When we use tools such as yum to install software, we are actually installing or updating RPM packages in the system. The path where RPM packages are stored in the system has certain specifications. The following will introduce the standard paths where RPM packages are stored in common Linux distributions and provide some code examples.

The RPM tool on Linux has always been one of the important tools for managing software packages. Whether you are a Linux system administrator or a developer, it is important to understand the basics of RPM tools. This article will provide an in-depth analysis of the LinuxRPM tool to help you better understand its principles, uses and operation methods. 1. What is the RPM tool? The full name of RPM is RedHatPackageManager. It is a tool used to manage software packages on Linux systems. its most

Redis is a high-performance key-value database. The emergence of redis has largely compensated for the shortcomings of keyvalue storage such as memcached, and can play a very good supplementary role to relational databases in some situations. Early preparation platform: centos6.5x86_64 Installation: redis-3.0.7-4.el6.art.x86_64.rpm Download the rpm package and open the address http://pkgs.org/download/redis to enter according to your own Linux platform and what you need to install Go to the redis version and download the corresponding rpm package. Here we take redis3.0.7 as an example to install: [roo
