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

用户昵称不能为空 2014-06-13 03:41:58
安装LAMP环境,服务器是CentOS(VM虚拟机上搭建的),自带有MYSQL。
也可以所以用yum命令直接安装mysql
yum install mysql
yum install mysql-server
yum install mysql-devel


然后查看所在位置:

[root@localhost php-5.5.13]# whereis mysql
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@localhost php-5.5.13]# which mysql
/usr/bin/mysql
[root@localhost php-5.5.13]# pwd
/home/default7/Downloads/php-5.5.13
[root@localhost php-5.5.13]#
[root@localhost php-5.5.13]# find / -name my.cnf
/etc/my.cnf

[root@localhost php-5.5.13]# pwd
/home/default7/Downloads/php-5.5.13
[root@localhost php-5.5.13]# ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/share/mysql


运行最末尾报错(最末尾几段):

checking whether to enable multibyte string support... no
checking whether to enable multibyte regex support... yes
checking whether to check multibyte regex backtrack... yes
checking for external libmbfl... no
checking for external oniguruma... no
checking for mcrypt support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
configure: error: Cannot find MySQL header files under /usr/share/mysql.
Note that the MySQL client library is not bundled anymore!


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 文件夹内容

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





...全文
391 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
AboutCode 2015-01-22
  • 打赏
  • 举报
回复
引用 3 楼 default7 的回复:
其实新版的不需要指定mysql地址。直接使用--with-mysql即可。
一句话解决所有问题!好回答!
码无边 2014-06-16
  • 打赏
  • 举报
回复
Cannot find MySQL header files 这是由于安装mysql时没有安装mysql头文件,或者是路径指定不正确,php找不到mysql的头文件引起的错误提示。 执行下 find / -name "mysql"
  • 打赏
  • 举报
回复
其实新版的不需要指定mysql地址。直接使用--with-mysql即可。
mumubangditu 2014-06-14
  • 打赏
  • 举报
回复
[root@localhost php-5.5.13]# which mysql /usr/bin/mysql 不是告诉你mysql在/usr/bin/mysql吗?为什么还要用/usr/share/mysql?
lvlfforever 2014-06-13
  • 打赏
  • 举报
回复
用whereis之类的命令找

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧