Archive for January 17th, 2013

How to move only database and tables structure from MySQL server to another – Dump only empty SQL Schema table structure

Thursday, January 17th, 2013

 

mysql sql dump empty database and tables re-create only SQL structure from one host to another Linux

For web development purposes it is necessery to copy MySQL SQL database schema structure without copying the filled in data. A typical case where a replicate of SQL server structure is needed to be installed on another server is on whether a client is bying a new website and it is planned his website Database Design is similar or same like another already working productive website.

Thanksfully, one doesn't have to script in perl or bash cause  mysqldump dump tool has already integrated option for that (–no-data).

Here what mysqldump man page says of  –no-data;

 

  –no-data, -d

           Do not write any table row information (that is, do not dump table contents). This is useful if you want to dump only the
           CREATE TABLE statement for the table (for example, to create an empty copy of the table by loading the dump file).

 

1. Moving SQL data scheme for all databases in MySQL Server

 On host with SQL containing productive data, to dump only the structure of databases / tables and table type, fields rows etc.:

host1# mysqldump -d -h localhost -u root -p'your_password' >sql-all-dbs-tables-empty-structure.sql

Then on the secondary MySQL server, where empty SQL structure (without any filled in info) is needed run:

host2# mysql -u root -p'your_password' < sql-all-dbs-tables-empty-structure.sql

 

2. Moving SQL data structure for only concrete database

On Linux host1 shell issue;

host1# mysqldump -d -h localhost -u root -p'your_password'  database_name>sql-database-empty-structure.sql

On host2 server type;
host2# mysql -u root -p'your_password' < sql-database-empty-structure.sql

3. Moving SQL data structure for few databases

Lets say you have a user (new_user), who has privileges over a number of databases and you want to dump a dump copy of those empty databases;
Same like with one table, just include names of all databases scheme to dump;

host1# mysqldump -d -h localhost -u new_user -p'your_password'  database_name atabase_name2 database_whatever >sql-only-some-databases-structure.sql
 

Then to import on host2 again;

host2# mysql -u new_user -p'your_password' < sql-only-some-databases-structure.sql

4. Dumping and copying only database names from one MySQL to another

Though the case might be rary you might need to dump and copy only list of all databases existing without recreating table database sub-structure. This is doable like so:

On SQL node host1 run;

host1# for i in $(echo "show databases;" | mysql -u root -p|grep -v -E 'Database$' |grep -v information_schema); do echo $i >> structure.txt; done

host2# for i in $(cat structure.txt); do echo "create database $i;" | mysql -u root -p; done

Though I've tested all this and it is safe to use, if you're re-creating SQL database / tables structure make sure you have a working copy of data from SQL.
Well that's it hope this little article helps someone 🙂

Saint Anthony The Great Troparion in Arabic sung in Lebanon – The excessive literacy and spiritual illiteracy

Thursday, January 17th, 2013

saint-Anthony-the-great-holy-orthodox-icon

Today 17 of January  in Bulgarian, Greek and Romanian Orthodox Church and those Churches which are using the so called New Church Calendar,  celebrate the feast of our Holy Venerate Father Saint Anthony the Great. I have a special love or better to say saint Anthony has a special love for me. Saint Anthony is a father of the fathers and one of the most desert hermit monks. Saint Anthony was illiterate and poor in worldly knowledge but abundant in the science of sciences the knowledge of God. Today most of the society is completely educated and still most of people even among the highly educated rich in worldly knowledge are complete spiritual beggars. I myself am one of them. We're all filled with worldly wisdom, read and stay uneducated about the truth as the Holy Apostle says. But we have our Holy Father Saint Anthony by whose prayers still God shows mercy to us. Let by his holy prayers, we the highly literate of worldly knowledges attain faith and spiritual knowledge.
 

Saint Anthony The Great Troparion in Arabic – The father of desert fathers

 

Oh Holy Hermit Father Anthony pray the Lord our souls be saved !

The Treasures of Hermitage, Saint Peterburg Russia and its imitation Hermitage in Amsterdam

Thursday, January 17th, 2013

Sankt-Peterburg-Hermitage

Since some time, I'm very interested in Russia culture as it is so inter-related to our culture in Bulgaria. .It is sad that nowadays Bulgaria is not with Russia, we share much more cultural and heritage roots with Russia than any Western European county or even generally Europe. Thus I believe for every Bulgarian and generally for anyone interested in art, maybe the most remarkable place to visit if you're in Russia is the city of Saint Peterburg. There is found the Russian National State museum. The Hermitage is a museum which historically used to be Winster Palace (Residency) for the Russian Tsar / King. What is unique about this museum is it is one of the oldest and largest museums in the world. The musem was founded in 1764 and since 1852 is in open for public visits. The museum consists of 3 000 000 unique items. Only a small number of those 3 million are exposed for public visitors. The museum contains artifacts from all around the world including very rare things like Mummy sarcophagus. The amount of gold in mostly everywhere is remarkable the ornaments and everything is amazing. For people who value art it is a must see. I still did not have the opportunity to see it with my own eyes. But even seeing it on a video is very  worthy.


 

The Treasures of Hermitage, Saint Petersburg, Russia (State Hermitage Musem of Russia)

As I'm currently in Holland, it was very interesting to find out one of the worthy things to see in Holland is an imitation of st. Peterburg's Hermitage in Amsterdam. There is plenty of beautiful and unique works in it too, as you can check in below video.


 

Hermitage Museum Amsterdam Tour an imitation of Hermitage State Museum of Russia

Enjoy ! 🙂

Fixing Apache error – client denied by server configuration on FreeBSD

Thursday, January 17th, 2013

If you have just installed a FreeBSD host with Apache and configured a Vhost document root to interpret  PHP or Perl scripts and you end up with error in browser like:

 

HTTP 403 / client denied by server configuration error

or

Forbidden
You don't have permission to access /index.html on this server.

It is most likely due to improperly configured Apache directory or directories permissions. In Apache error log /var/log/httpd-error.log, there are plenty of error messages logged like:

[Tue Jan 15 13:09:39 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html/management
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html/management
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html

The issue is caused by Apache <Directory> configuration which is restrictive and set to first deny and then apply allow rule, i.e.:

 

<Directory /usr/home/hipo/public_html>
  Options ExecCGI -Indexes FollowSymLinks
   Allowoverride All
    Order Deny,allow
    Deny from all
    Allow from localhost
    Allow from 123.123.123.123
</Directory>

To solve the problem change default Deny set policy (Deny from all) and first policy to be applied which is Deny to allow;

 <Directory "/usr/home/hipo/public_html">
        Options ExecCGI -Indexes FollowSymLinks
        Allowoverride All
        Order Allow,deny
        Allow from all
        #DirectoryIndex index.cgi
  </Directory>

It is possible to not specify any Order Allow,deny (if there is no previous Apache <Directory> directive to override, so in many  cases you can use;

 <Directory "/usr/home/hipo/public_html">
        Options ExecCGI -Indexes FollowSymLinks
        Allowoverride All
        Allow from all
        #DirectoryIndex index.cgi
  </Directory>

Finally restart Apache and all should be good;

freebsd# /usr/local/etc/rc.d/apache22 restart
....

Video Review of Top Cities, Places and Things – must see in the Netherlands

Thursday, January 17th, 2013

South of Haarlem, makes the ultimate outing for ogling Holland's famed flower. The bulb fields in and around Keukenhof burst into colour from the end of March to mid May.
 

HOLLAND: Keukenhof – world's largest flower garden [HD]

 


 

hoe leuk is nederland , delft holland (How nice is Holland – Delft (one of the ancient cities in Holland)


 

Utrecht, The Netherlands

Views of the city of Utrecht and its tourist attractions like the Oudegracht canal, the Domkerk, Domtoren, Pieterkerk, Muziek Centrum. Check out the old tower museum and try to spot the Gothic churches spread around the city.


 

Utrecht Netherlands, City, Life and University


 

HOLLAND in MINIATURE – MADURODAM – The Hague, Netherlands

Madurodam is a park and tourist attraction in Scheveningen, The Hague, Netherlands, home to a range of perfect 1:25 scale model replicas of famous Dutch castles, public buildings, and large industrial projects as found at various locations in the country. The park was opened in 1952 and has been visited by tens of millions of visitors since that date. Madurodam was named after George Maduro, a Jewish law student from Curaçao who fought the Nazi occupation forces as a member of the Dutch resistance and died at Dachau concentration camp in 1945. In 1946 Maduro was posthumously awarded the medal of Knight 4th-class of the Military Order of William, the highest and oldest military decoration in the Kingdom of the Netherlands, for the valor he had demonstrated in the Battle of the Netherlands against German troops. His parents donated the funds necessary for the Madurodam project.


 

Scheveningen Beach (The Hague) Netherlands

Very surprisingly in Holland there are beaches too 🙂 It is a bit funny in such a Northern Country, there could be beach but there is. As you can see the sun lack takes off from enjoying the beach bathing. If you never have tried a Northern Beach destination and you happen to drop off Netherlands in the Summer give it a try 🙂


 

Haarlem The Netherlands – An Old Dutch city who most likely give birth to famous American suburb


 

Holland Gouda, The World famous Cheese Market

Nationaal park De Hoge Veluwe

near Arnhem, among whose attractions is an underground museum dedicated to subterranean life, and the Kröller-Müller Museum (www.kmm.nl) which contains 280 Van Gogh paintings as well as numerous other works. Bicycles are available free of charge to visitors.


 

Maastricht, Netherlands – Ancient Dutch city, place where European Union creation agreement was signed

Holland's oldest fortified city – Full of Medieval interesting architecture


 

NEMO Museum Amsterdam

 


 

Rotterdam Holland Tourist Attractions


 

Amsterdam Holland

Holland's emblematic capital (www.iamsterdam.com) brims with romance, culture and kicks. Take a candlelit cruise along the canals, lined with narrow-fronted buildings dating from the city's heyday as a trading centre, browse the paintings of the Dutch masters at the Rijksmuseum or join the punters prowling the alleyways of the Red Light District.


 

Hermitage Amsterdam Tour – Sibling of the Original Hermitage in St. Peterburg


 

Open air museum Arnhem in the Netherlands