Trouble connecting to Sphinx MySQL in development - mysql

I have Thinking Sphinx installed in my Rails app. Everything works fine in Heroku, but locally I cannot get anything up and running.
When I try to run rake ts:index, I get
sh: indexer: command not found
When I try to use the search function in the app I get
Error connecting to Sphinx via the MySQL protocol. Error connecting to Sphinx via the MySQL protocol. Can't connect to MySQL server on '127.0.0.1' (61) - SELECT * FROM `book_core` WHERE MATCH('economics') AND `sphinx_deleted` = 0 LIMIT 0, 20 OPTION field_weights=(title=16,author=7); SHOW META
Thanks for the help!

It sounds like you don't have Sphinx itself installed:
http://pat.github.io/thinking-sphinx/installing_sphinx.html
If you do have it installed but it's still not picking things up, then perhaps the executables are not in your PATH environment variable?

Related

Missing the MySQL extension on Nginx and MariaDB

My current configuration is as follows:
Macbook Pro 2013 (Mojave)
php#7.3
mariadb
nginx
When accessing WordPress website on my localhost getting this error.
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
While with valet my laravel projects working fine with mariadb > mysql.
What else needs to be configured?
PHP 7 has thrown out the "mysql_*" interface.
Do not use php-mysql, use php-mysqli or php-pdo. But, of course, you will need a new enough WP to make use of such.

MySql 8.0.15 install failure Invalid Server Template

This is my first MySql install from the ground up.
I am using Windows Server 2016, trying to install MySql 8.0.15. I am doing this to try and use it with php 7.3.1.
The install has all the listed prerequisites.
When I get the config section of mysql insstaller, it breaks on the first response with an error of "Beginning configuration step: Writing configuration file
Invalid server template
Ended configuration step: Writing configuration file"
The system event log has one error, "The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{8D8F4F83-3594-4F07-8369-FC3C3CAE4919}
and APPID
{F72671A9-012C-4725-9D2F-2A4D32D65169}
to the user NT AUTHORITY\SYSTEM SID (S-1-5-18) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool."
But I'm not sure this is even the right troubleshooting path to start down.
Can you assist with some guidance?
I had the same problem with the
mysql-installer-web-community.
The mysql-installer-community was working without a problem.
The bottom link is the none web installer which was working.
For me initially when I was not accepting the initial update mysql pop-up then installer was not working, but once I accepted it. Then it successfully worked for me.
I have been able to install after getting the same error.
I have changed the credentials for the sql root.
By default, host is set to something like %ALL_HOST%. I changed to localhost.
I ended up uninstalling all mysql 8 components that had already installed.
Then went back and got the mysql installer 5.7.25.0. I think I had some trouble after that, but it wasn't the same error. I finally ended up installing mysql 8.0.15 by itself and it worked. Then I went back and did the connectors. Next the workbench. Finally docs and samples. Doing them one at a time seemed to go better. I am now up and running.
Here's what I did to fix the issue
completely removed mySQL Server and Workbench installations.
uninstalled the mySQL web installer. Restarted my computer.
ran the mySQL web installer again (only installing mySQL Server)
downloaded the mySQL Workbench installer to install Workbench separately

Laragon MySQL ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 "Unknown Error")

I'm using http://laragon.org for my server
I got a problem yesterday my apps cannot connect to mysql and give me this error message
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost'
(10061 "Unknown Error").
and I tried to run mysql -v but got same error. I'm using :
OS Windows 10 64bit
Laragon v0.7
No antivirus running
No others server running (this is the only server in the pc)
I'm searching everywhere but the answer is to start MySQL service, but I don't find any MySQL service in services.msc (I read on their site if Laragon won't add anything to the System Path Variable.
But, you are freely to use composer, artisan, mysql, mysqldump, httpd, redis-cli, ... in Laragon' shell)
and in their control panel status MySQL 10.0.20 started.. i tried to restart all service and pc but still got the problem
anyone know how to fix this problem ?
UPDATE : mysql -V is working, just need to uppercase -v, but still cannot connect to my MySQL Database
You're running a very old version of Laragon.
Try installing Laragon 0.9 151004, I believe it helps.
From the website, it appears that:
No Windows Services
Laragon manage other servers by its own optimal service manager.
This provides a reason as to why you couldn't find MySQL service in services.msc. Can you check the interface itself (if you can not find the laragon service itself in services.msc) and check whether MySQL service is running or not?
Additionally, look into laragon's installation directory for a logs file. Close and restart laragon if everything fails.

having issues getting php to talk to mysql set up on a mac -

My friend has a mac - we got AMPPS set up so he can run Apache, PHP and MySQL.
We got it up running. I can talk to mysql using phpMyAdmin.
I am running codeigniter - its working fine - but I'm getting an error when it tries connect to the database
Fatal error: Call to undefined function mysqli_init() in
mysqli_driver.php on line 126
I have a feeling that I'm missing the mysql.so extension or module in the Apache install or the PHP install.
How do I install that on a mac, or which config file do I need to modify?
That error indicates that the mysqli.so module is not loaded. Check the results of phpinfo() to see where the configuration file is, and make sure the module's being included properly. Often times there is a separate ini file for each module that's separately installed.
Personally I'd stay away from mysqli and use something higher level like PDO. I'd also recommend installing something maintainable like MacPorts or Homebrew to run Apache/MySQL/PHP instead of a pre-packaged solution.

Cannot connect Wordpress to MySQL database

Doing some local website work to learn Wordpress theme development.
Tried to set up Wordpress through the prompts, also tried it by manually entering information in the wp-config.php file, neither would work. Still cannot connect to the database, the setup-config.php page returns "Error establishing a database connection". I've double, triple, and quadruple checked the login credentials (database name, username, password etc.), they are complete and correct. Deleted wp-config.php and tried again through the web page, same result.
MySQL is definitely running, the Mac System Preferences panel says so, and I can login and run SQL queries at the command line, although I have to do that as root. Should I be running MySQL as root?
This problem exists with Wordpress and also with an instance of phpMyAdmin that I've also installed, so I don't think it's anything to do with the PHP code as such, it smells more like a permissions thing. For what it's worth, I've edited my httpd.conf file to get Wordpress on port 80 and phpMyAdmin on 8081. Apache is serving those sites up as it should and PHP is running, it's just getting either site to connect to the database that's the problem.
System information:
Mac OS X 10.9.5 (Mavericks)
PHP Version 5.4.30
MySQL version:
mysql Ver 14.12 Distrib 5.0.45, for apple-darwin9.2.0 (i686) using EditLine wrapper
In my case it was as simple as changing the DB_HOST so it was using the correct host and port in wp-config.php:
define('DB_HOST', '127.0.01:3306');
I found the solution on this stackoverflow page.
By default, Apache cannot send requests to a remote MySQL server. It should be enabled.
On CentOS 6 the solution is the command:
setsebool httpd_can_network_connect=1
Check your phpinfo(); to see if MySQL extension for php is installed.
I experienced a similar issue and it turned out that the authentication type used by MYSQL was not supported.
To verify this, add
define('WP_DEBUG', true)
in the wp-config.php and re-run the installation. You will see an entry indicating if that's the case.
If the issue is confirmed to the authentication method, try
mysql> CREATE USER ‘username’#‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;
after logging in to mysql console.