I have checked almost all solutions both in Openshift forum and here in stackoverflow but couldn't solve the problem.
Here is the situation
I have a php server with load balancing in one gear.
I have a second gear for mysql server along with PhpMyAdmin. At present OpenShift does not support load balancing for PhpMyAdmin, so my second gear does not have any scaling feature.
Now I want to host a php app in first gear and the database in the second gear. So how do I connect them internally (would be better if I could do it without port forwarding)? I need all the commands from the beginning to the end unfortunately.
Thank you.
You should just add the mysql cartridge to your scaled application. It will still put the mysql database on it's own gear, but it will be accessible from your scaled application using the standard mysql environment variables. You can view those variables by sshing into your application and running env | grep mysql. If you decide to run your own second gear for the mysql database (you still had to install a web cartridge anyways to do that right?) then you will either HAVE to use port forwarding for direct access, or you will have to write an API on that server that will allow your application to access the mysql database.
Related
Me and my friend have to do a project in Mysql and i am trying to find how me and my friend can work on mysql together from our own workstations. Is there a way where we both can work on the same database together without being physically present.
I am fairly new to mysql.
Just take cheap shared hosting that has MySQL databases and preferably also PHPmyAdmin and cPanel or any other panel to easily manage your databases. In that way, you have minimum hassle to create and manage databases that you can both access.
Google "compare cheap shared hosting" and that's it. Or take this quick Google result I got: https://www.pcmag.com/picks/the-best-cheap-web-hosting-services
If you're not happy to pay $1-$2 per month for hosting then you can install WAMPP or XAMPP on Windows machine but then you'll have to also Google how to forward ports from your router.
Edited 3aug2020: For a free MySQL hosting for up to 5MB free storage please, check https://www.freemysqlhosting.net
You can use a program like XAMPP to host mysql and port-forward phpmyadmin so your friend can visit your db
https://www.apachefriends.org/index.html
If you have MYSQL running on a server or your local computer you can both access phpmyadmin (http://server-ip/phpmyadmin) you can also use programs like Navicat (paid) or HeidiSQL (Free).
You can make the database remotely accessible, in which case your friend can connect and work on it as well.
Without knowing more about your network setup it is difficult to say how you should proceed, but generally it is enough to spin up a mysql-server instance on the host machine, then forward a WAN port to the LAN address and port of the host machine.
I am trying to host 100+ Wordpress websites on Azure. For that I would need MySQL databases and I am confused which route I should go. With quick google search, I found mainly three options
Use MySQL Preview (which is not good for production environment)
Purchase costly third party subscription by ClearDB or Bitnami
Set UP windows/Linux VM and host LAMP Server on it. Host MySQL server there. I am just trying to know if there are any other better options. Thank you.
Update: One primary requirement I have is those wordpress websites are already created and I am migrating them to new hosting. I need separate database for each Word press site.
I am about to install WordPress on a Windows 2008 server - two load balanced servers with a UNC share. Web browsing using the server is out of the question (IT security policy) so using the Microsoft Web Platform Installer is also a non starter. I will therefore have to install it manually.
So far I have installed PHP (routine), but I now need to install MySQL and create a database. However, with these being two separate servers, what effect is this going to have on the database - will this require a database on each server? Will they remain in sync? Can the database itself be put in the UNC share?
In short, can anyone advise me whether this is possible and how to go about it?
Thanks
Install MySQL and create the database on the server which is supposed to have it - preferably a 3rd one or on the UNC. In the MySQL config, enable network connections via my.cnf, specifically the bind-address.
Both the PHP boxes should connect to that one MySQL db (using it's LAN ip address). (And yes, they would remain in sync since they connect to the same db.)
I need to review the mysql 5.5 server logs but I cannot find a way to get access them via ssh, sftp or mysqlworkbench. The mysql cartridge is in a scaled application. A solution?
There are a couple things here I'd like to point out that should provide some more information on how things work and how to get to the information you're looking for.
Scalable applications with DB's actually have the DB running in a separate gear than the application framework (for scaling purposes). For instance, if you ran rhc app show <appname> --gears for one of your scalable applications you would see that there are 2 gears being used and that the ssh information for each of them is different. So if you're just looking to take a quick look at your logs via ssh, you'll need to ssh into the appropriate gear to get to them.
You will need to use the rhc port-forward command to forward the right local ports to your database gear and then be able to connect mysqlworkbench from there.
Is there any workaround to lack of proxy port in OpenShift Online?
Why I need it? I've got three application gears. All of them run JBoss. One of them run additionaly MySql.
I need to make three ports (3306, 5445, 5455 - mysql and HornetQ) from gear with MySQL available to other gears (HornetQ to one and MySQL to another). Is there a way to do it?
If you create a scalable application then you can access MySQL gear from other applications. Lets suppose you create a scalable application using JBoss and MySQL then OpenShift would install MySQL and JBoss on separate gears.This would allow other applications to access the MySQL database.