trynreadme Posted January 15, 2013 Share Posted January 15, 2013 I’m trying to run MySQL 5.1.58 on Ubuntu 12.04, It’s a task I was assigned for those whose first question is 'Why don't you just apt-get?' I’m also trying to run Apache and PHP5. I compiled MySQL 5.1.58 and apt-get both Apache and PHP5. Everything works great, but when I try to connect PHP and MySQL with 'apt-get install php5-mysql', it breaks MySQL. When I run ./bin/mysqld_safe -–user=mysql &, I get an error about /var/lib/mysql for .err, not being there. I tried ln -s to the mysql install location, that fixes that error. But, when I run it again, I still get an error. When I check the .err file it says: [ERROR] Can’t find messagefile ‘usr/share/english/errmsg.sys’ [Note] Plugin ‘FEDERATED’ is disabled. /usr/local/mysql/bin/mysqld: Uknown error 1146 [ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it. InnoDB: Initializing buffer pool, size = 8.0M InnoDB: Completed initialization of buffer pool InnoDB: Operating system error number 13 in file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name ./ibdata1 InnoDB: File operation call: ‘create’. InnoDB: Cannot continue operation. mysqld_safe mysqld from pid fiel /var/run/mysqld/mysqld.pid ended I don’t understand what ‘access rights’ mysqld needs. When I check them, mysql user has ownership and the group is mysql of data folder in /usr/local/mysql/. Is there something I’m missing/doing wrong? Appreciate any help. Quote Link to comment https://forums.phpfreaks.com/topic/273213-mysql-5158-and-php5-issues/ Share on other sites More sharing options...
kicken Posted January 15, 2013 Share Posted January 15, 2013 Trying to apt-get php5-mysql is going to cause apt to include the mysql client libraries. Ubuntu's version of these libraries likely conflict with your self-compiled version and are going to cause you all sorts of problems. Things like this is why compiling stuff your self and using apt-get don't mix well, especially if there is a dependency involved between your self-compiled stuff and the package-managed stuff. You could probably either compile PHP yourself as well, or just go with the apt-get version of mysql so everything matches up. Quote Link to comment https://forums.phpfreaks.com/topic/273213-mysql-5158-and-php5-issues/#findComment-1405960 Share on other sites More sharing options...
trynreadme Posted January 16, 2013 Author Share Posted January 16, 2013 Alright, having some issues on the php compiling. I did a wget for http://us2.php.net/get/php-5.4.10.tar.bz2/from/this/mirror, then did bzip2 -d and a tar xvf. After that, ./configre --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/lib, then make, make install. Then, I configured the httpd.conf with: <FilesMatch "\.ph(p[2-6]?|tml)$"> SetHandler application/x-httpd-php </FilesMatch> Could not locate libphp5.so. From my understanding you need to also insert into httpd.conf: LoadModule php5_module /location/to/libphp5.so I also copied php.ini-development to /usr/local/lib/php.ini. After all of this I did /etc/init.d/apache2 restart. Apache continues to start just fine, but when I visit the page with phpinfo(), my browser just downloads it rather than viewing it. TIA, and I appreciate the help so far! Quote Link to comment https://forums.phpfreaks.com/topic/273213-mysql-5158-and-php5-issues/#findComment-1406001 Share on other sites More sharing options...
trynreadme Posted January 16, 2013 Author Share Posted January 16, 2013 Could not locate libphp5.so. From my understanding you need to also insert into httpd.conf: LoadModule php5_module /location/to/libphp5.so I kind of fixed it, I did an apt-get for libapache2-mod-php5, and LoadModule doesn't need to be put in httpd.conf. But, unfortunately there is no mysql on the phpinfo page. Quote Link to comment https://forums.phpfreaks.com/topic/273213-mysql-5158-and-php5-issues/#findComment-1406002 Share on other sites More sharing options...
kicken Posted January 16, 2013 Share Posted January 16, 2013 You need to include the --with-apxs2 when compiling PHP to build it as an apache module. apt-get'ing that lib is going to present the same issues you had when you tried to apt-get php5-mysql. Your using ubuntu's version which may be incompatible with your custom-compiled stuff. Quote Link to comment https://forums.phpfreaks.com/topic/273213-mysql-5158-and-php5-issues/#findComment-1406005 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.