Some time ago on one of the Database MySQL servers, I've configured replication as it was required to test somethings. Eventually it turned out replication will be not used (for some reason) it was too slow and not fitting our company needs hence we needed to disable it.
It seemed logical to me that, simply removing any replication related directives from my.cnf and a restart of the SQL server will be enough to turn replication off on the Debian Linux host. Therefore I proceeded removed all replication configs from /etc/my/my.cnf and issued MySQL restart i. e.:
sql-server:~# /etc/init.d/mysql restart
This however didn't turned off replication,as I thought and in phpmyadminweb frontend interface, replication was still appearing to be active in the replication tab.
Something was still making the SQL server still act as an Replication Slave Host, so after a bit of pondering and trying to remember, the exact steps I took to make the replication work on the host I remembered that actually I issued:
mysql> START SLAVE;
Onwards I run:
mysql> SHOW SLAVE STATUS;
and found in the database the server was still running in Slave Replication mode
Hence to turn off the db host run as a Slave, I had to issue in mysql cli:
I'm doing replication for one server. Its not the first time I do configure replication between two MySQL database nodes, however since I haven't done it for a few years, my "know how" has mostly vanished so I had some troubles in setting it up. Once I followed some steps to configure replication I had to check if the two MASTER / Slave MySQL db nodes communicate properly. Hence I decided to drop a short post on that just in case if someone has to do the same or if I myself forget how I did it so I can check later on:
1. Check if MASTER MySQL server node is configured properly
The standard way to check a MySQL master node status info is with:
mysql> show master status; +——————+———-+———————————————————+——————+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +——————+———-+———————————————————+——————+ | mysql-bin.000007 | 106 | database1,database2,database3 | | +——————+———-+———————————————————+——————+ 1 row in set (0.00 sec)
By putting \G some extra status info is provided:
mysql> show master status\G; *************************** 1. row *************************** File: mysql-bin.000007 Position: 106 Binlog_Do_DB: database1,database2,database3 Binlog_Ignore_DB: 1 row in set (0.00 sec)
ERROR: No query specified
2. Check if Slave MySQL node is configured properly
I'm running a two servers for a couple of home hosted websites. One of the servers is serving as Apache host1 and has configured MySQL running on it and the second is used just for database host2 – (has another MySQL configured on it). The MySQL servers are not configured to run as a MySQL MASTER and MySQL SLAVE (no mysql replication), however periodically (daily), I have a tiny shell script that is actualizing the data from the active SQL host2 server to host1.
Sometimes due to electricity problems or CPU overheats the active MySQL host at host2 gets stoned and stops working causing the 2 WordPress based websites and One joomla site inaccessible. Until I manually get to the machine and restart host2 the 3 sites are down from the net and as you can imagine this has a very negative impact on the existing website indexing (PageRank) in Google.
When I'm at home, this is not a problem as I have physical access to the servers and if somethings gets messy I fix it quickly. The problem comes, whether I'm travelling or in another city far from home and there is no-one at home to give the hanged host hard reboot ….
Lately the problems with hang-ups of host2 happaned 3 times or so for 2 weeks, as a result the websites were inaccessible for hours and since there is nobody to reboot the server for hours; the websites keep hanging until the DB host is restarted ;;;;
To work-around this I came with the idea to write a tiny shell script to check if host2 is ping-able in order to assure the Database host is not down and then if script determines host2 (mysql) host is down it changes wp-config.php (set to use host2) to a wp-config.php (which I have beforehand configured to use) host1.
Using the script is a temporary solution, since I have to actually find the real hang-up causing troubles, but at least it saves me long downtimes. Here is a download link to the script I called change_blog_db.sh . I've configured the script to be run on the Apache node (host1) via a crontab calling the script every 10 minutes, here is the crontab:
The script is written in a way so if it determins host2 is reachable a copy of wp-config.php and Joomla's configuration.php tuned to use host2 is copied over the file config originals. In order to use the script one has to configured the head variables script section, e.g.:
wp-config-localhost.php, wp-config-192.168.0.2.php ,configuration-192.168.0.2.php, wp-config-localhost.php to be existing files configured to with proper host1 and host2 IP addresses. Hope the script will be useful to others, experiencing database downtimes with WordPress or Joomla installs.
We're living at a times, where information has become more valuable than money and gold. Though we're living in a such a wild changing times, still it is not easy to answer in onefold clear way what is information. The more the world and humanity developed the more meanings information word accepted. While checking some interesting videos on the net, I've come across a video representing in a very brief form the history of information.
The Story of Information and how we come to be at where we are now
We're living at a times, where information has become more valuable than money and gold. Lest that living in a such a wild changing times, still it is not easy to answer in onefold clear way what is information. As you can see from the video, the more the world and humanity developed the more meanings information word took up.
At the end end of the short presentational video there are few questions asked:
Who coined the term MEME
How many zeros are in yottabyte?
What is a one thing that can escape a black hole?
I did a quick research on the newly heard words and came to know meme concept. A meme is an "an idea, behavior or style that spreads from person to person within a culture.". The theory lists some interesting information like replication of personality (propagation) from one person to another etc. etc. However the general content of meme's theory puts Christian faith, religions and all kind of people beliefs in the graph of being just a continuous meme's patterns which are transferred from a person to person (generation to generation). Therefore according to memetics (as the meme's science is called), Christian faith and even my Orthodox Christian faith is just an informtion transmitted similarly to genetics information and the laws against:; sexual morality, bestiality, adultery, castration etc. are just a taboo and makes not sense and is just they claim is a information transferred from family generation to next generation until today.
Obviously the whole "theory" of memetics as a science is not true and is just a world view of Mr. Richard Dawkins in a book called The Selfish Gene (1976). It is well to be said Dawkins a follower of the fairy tales of Charle's Darwin's Darwinism. Modern science however is seriously questioning Darwin's materialist world view. There are plenty of scientific researches which has prooved the existence of spiritual realm and hence some of the claims memetics are standing on a shaky grounds.
Concerning the second question in the video how many zeros are in an yottabyte the answer according to FreeFactFinder.com is:
So having in mind the yottabyte equals 1,208,925,819,614,629,174,706,176 bytes if in bytes it would have 2 zeros 🙂
But if by zero is meant the number of values which could become zeroes then the answer would be 24 zeroes. This of course is in bytes in zettabytes the zeroes are only 0 or 3i.e.(1024 zettabytes) 🙂
Moving back to the 3rd video question What is a one thing that can escape a black hole?. The answer is "WHO KNOWS ??". The BlackHoles are a matter of science based on a huge theory base, there are plenty of discussions by some scientists still doubting if black holes really exist ,,, even if we assume blackholes exist noone can tell if the blackhole would suck up all matter (including light) or some specific kind of still un-researched matter or energy can get out… In short the question imposed is completely ridiculously funny 😉
☩ Walking in Light with Christ – Faith, Computing, Diary 2006-2020 Powered by: Pc Freak Solutions and Comments (RSS). Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.