Home  >  Article  >  Backend Development  >  【装配】LAMP MySQL不知到安装到哪里去了。yum install mysql-server

【装配】LAMP MySQL不知到安装到哪里去了。yum install mysql-server

WBOY
WBOYOriginal
2016-06-13 12:01:251058browse

【安装】LAMP MySQL不知到安装到哪里去了。yum install mysql-server

本帖最后由 default7 于 2014-06-13 16:00:53 编辑 安装LAMP环境,服务器是CentOS(VM虚拟机上搭建的),自带有MYSQL。
也可以所以用yum命令直接安装mysql
yum install mysql<br />yum install mysql-server<br />yum install mysql-devel


然后查看所在位置:
<br />[[email&#160;protected] php-5.5.13]# whereis mysql<br />mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz<br />[[email&#160;protected] php-5.5.13]# which mysql<br />/usr/bin/mysql<br />[[email&#160;protected] php-5.5.13]# pwd<br />/home/default7/Downloads/php-5.5.13<br />[[email&#160;protected] php-5.5.13]# <br />[[email&#160;protected] php-5.5.13]# find / -name my.cnf<br />/etc/my.cnf<br /><br />[[email&#160;protected] php-5.5.13]# pwd<br />/home/default7/Downloads/php-5.5.13<br />[[email&#160;protected] php-5.5.13]# ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/share/mysql<br />


运行最末尾报错(最末尾几段):
<br />checking whether to enable multibyte string support... no<br />checking whether to enable multibyte regex support... yes<br />checking whether to check multibyte regex backtrack... yes<br />checking for external libmbfl... no<br />checking for external oniguruma... no<br />checking for mcrypt support... no<br />checking for MSSQL support via FreeTDS... no<br />checking for MySQL support... yes<br />checking for specified location of the MySQL UNIX socket... no<br />configure: error: Cannot find MySQL header files under /usr/share/mysql.<br />Note that the MySQL client library is not bundled anymore!<br />


Apache\PHP都已经安装好,就是MYsql不知到哪里去来 --with-mysql=这个路径我把 whereis mysql里面的每一个都试了都mysql错。mysql到底装到哪里去了。

configure: error: Cannot find MySQL header files under /usr/share/mysql.
Note that the MySQL client library is not bundled anymore!



/usr/share/mysql 文件夹内容
<br />[[email&#160;protected] mysql]# whereis mysql<br />mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz<br />[[email&#160;protected] mysql]# cd /usr/share/mysql<br />[[email&#160;protected] mysql]# ls<br />charsets              my-innodb-heavy-4G.cnf<br />config.huge.ini       my-large.cnf<br />config.medium.ini     my-medium.cnf<br />config.small.ini      my-small.cnf<br />czech                 mysql_fix_privilege_tables.sql<br />danish                mysql_system_tables_data.sql<br />dutch                 mysql_system_tables.sql<br />english               mysql_test_data_timezone.sql<br />errmsg.txt            norwegian<br />estonian              norwegian-ny<br />fill_help_tables.sql  polish<br />french                portuguese<br />german                romanian<br />greek                 russian<br />hungarian             serbian<br />italian               slovak<br />japanese              spanish<br />korean                swedish<br />my-huge.cnf           ukrainian<br />[[email&#160;protected] mysql]# cd bin<br />bash: cd: bin: No such file or directory<br />[[email&#160;protected] mysql]# <br /><br />





------解决方案--------------------
用whereis之类的命令找
------解决方案--------------------
[[email protected] php-5.5.13]# which mysql

/usr/bin/mysql

不是告诉你mysql在/usr/bin/mysql吗?为什么还要用/usr/share/mysql?

------解决方案--------------------
 Cannot find MySQL header files   

这是由于安装mysql时没有安装mysql头文件,或者是路径指定不正确,php找不到mysql的头文件引起的错误提示。

执行下
find / -name "mysql"
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