Some configuration options are set when PHP is installed, including:
--with-mysql[=dir]: includes MySQL extension, [=dir] specifies MySQL installation directory, omit [=dir] to default location/usr
--with-mysqli[=file]: Contains the mysqli extension, [=file] Specifies the Mysql_config file location, omitting [=file] is the default location/usr/bin/mysql_config
--with-pdo-mysql[=dir]: Contains the pdo:mysql extension, [=dir] Specifies the MySQL installation directory, omit [=dir] is the default location/usr
--with-apxs2[=file]: Compile to Apahce2 shared module, [=file] Specify apache2 apxs file location, omit [=file] to default location/USR/SBIN/APXS
Wait a few options, because I installed MySQL with the RPM package to install, so to know the default installation directory of MySQL, and some files (Lib, include, bin, data) location, it is necessary to do the following work to review.
Here is a post for Cu, see:
[RPM Installation path]mysql RPM package default installation path problem
Ask a master to help me solve a problem. Because I am the RPM package, not like the source code files to specify the path, I found a lot of online, said in the/usr/local/mysql path, but I see it does not exist, So what do you want me to do now? The header file and library functions that are provided by the MySQL API are all installed by default. That is, the installed MySQL directory (including Bin,data,include,lib ...). In what position?
You can specify a path when installing –prefix=/usr/local/mysql
You can now use RPM-QL MySQL to see
Learn to use man
Mans rpm
I use RPM-QL query, how can prompt not install? I can connect normally with MySQL, how can I know where to put it?
Or if I uninstall it, which directory should I go to?
Rpm-qa|grep MySQL Look
If there is no indication that you are not using RPM to install MySQL
I use Rpm-qa | Grep-i MySQL found, yes, I installed those RPM package, also can communicate normally, now I just can't find that MySQL root directory (including bin,data,include,lib ...), I mainly want to know where the MySQL provided API is where!
What do we do?
Find bin include Lib
Find/-name Mysql.h-print
Find/-name Libmysqlclient.so-print
Find/-name Mysql-print
View data
Mysql>show variables; DataDir
I got it! Thank you so much!
The find command is very useful!
It seems that the RPM package is to install each subdirectory into the corresponding directory, there is no root directory.
The above post can be known that when the installation with RPM, MySQL sub-directory is dispersed, placed in the following directories:
(RHEL5.4 RPM install MySQL)
[Email protected] ~]# 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
and data is put by default:/var/lib/mysql
MySQL is installed by default in:/usr/share/mysql
Install MySQL default installation path problem with RPM package