background preloader

How to change the mysql database location - Spike Developer Zone

How to change the mysql database location - Spike Developer Zone

How to move MySQL datadir to another drive | Kaliphonia.com Your MySQL database takes a huge space and your current drive is almost full? One of the available options is to move MySQL database to another drive with minimal downtime, here is how... On some machines this can also increase MySQL performance, especially one with fast drive -- such as Raptor or SCSI drive. I'm assuming: - the second drive mounted as "/home2" - current MySQL datadir is "/var/lib/mysql" - the content of "/var/lib/mysql" is the following: [root@server ~]# ls -o /var/lib/mysql -rw-rw---- 1 mysql 10485760 Jul 9 19:04 ibdata1 -rw-rw---- 1 mysql 5242880 Jul 9 19:04 ib_logfile0 -rw-rw---- 1 mysql 5242880 Jul 9 07:13 ib_logfile1 drwx------ 2 mysql 4096 Jul 15 07:40 joomla drwx------ 2 mysql 4096 Jul 9 06:03 mysql srwxrwxrwx 1 mysql 0 Aug 13 09:42 mysql.sock drwx------ 2 mysql 4096 Jul 9 11:31 users drwx------ 2 mysql 4096 Jul 9 08:22 wordpress [root@server ~]# Steps: We need to shutdown MySQL to get all data copied properly. /etc/init.d/mysql stop or /etc/rc.d/init.d/mysql stop Save

Four Python variable binding oddities Python has some strange variable binding semantics. Here are some examples. Oddity 1: If Python were a normal lambda language, you would expect the expression x to be equivalent to (lambda: x)(). I mean x to be a variable name here, but you would expect the equivalence to hold if x were any expression. x = 1 class C: x = 2 print x print (lambda: x)() Expected output: Actual output: There is a fairly good reason for this. Oddity 2: This is also about class scope. x = 1 class C: x = 2 print [x for y in (1,2)] print list(x for y in (1,2)) This happens for a mixture of good reasons and bad reasons. Otherwise class scopes would not behave as consistently. Oddity 3: x = "top" print (lambda: (["a" for x in (1,2)], x))() print (lambda: (list("a" for x in (1,2)), x))() Expected output might be: (['a', 'a'], 'top') (['a', 'a'], 'top') Or if you're aware of list comprehension oddness, you might expect it to be: (['a', 'a'], 2) (['a', 'a'], 2) (['a', 'a'], 2) (['a', 'a'], 'top') [1 for x in [100]] x = 100

dimdim An App A Day Moving the MySQL's datadir directory. - lunatechian (lunatech-ia By default, MySQL's datadir is placed in the /var/lib/mysql directory. However, if you are planning on using MySQL tables to store a lot of data and your /var partition is small, it might cause you problem at a later stage. In such a scenario, it is better to move the MySQL's datadir to another partition (like /home. The steps are Stop your mysql server before starting this operation Create the directories that will be new datadir chown the directory to the mysql:mysql user copy the files from the old datadir to the new location.

A Short Introduction to the ABC Language (Also available in Japanese) The ABC Programmer's Handbook is available from Bosko Books. ABC is an interactive programming language and environment for personal computing, originally intended as a good replacement for BASIC. It was designed by first doing a task analysis of the programming task. ABC is easy to learn (an hour or so for someone who has already programmed), and yet easy to use. Originally intended as a language for beginners, it has evolved into a powerful tool for beginners and experts alike. Here is an example function words to collect the set of all words in a document: HOW TO RETURN words document: PUT {} IN collection FOR line IN document: FOR word IN split line: IF word not.in collection: INSERT word IN collection RETURN collection Some features of the language: Some features of the environment: Here follows a quick overview of the programming language ABC and its implementations, and a few examples of ABC programs.

Survey From Wikipedia, the free encyclopedia Survey may refer to: Quantitative research[edit] Geography[edit] Surveying, the technique and science of measuring positions and distances on Earthphotogrammetry, a method of collecting information using aerial photographyCadastral survey, used to document land ownership, by the production of documents, diagrams, plats, and mapsDominion Land Survey, the method used to divide most of Western Canada into one-square-mile sections for agricultural and other purposesPublic Land Survey System, a method used in the United States to survey and identify land parcelsSurvey township, a square unit of land, six miles (~9.7 km) on a side, used by the U.S. Earth sciences[edit] Construction and mining[edit] Construction surveying, the locating of structures relative to a reference line, used in the construction of buildings, roads, mines, and tunnelsDeviation survey, used in the oil industry to measure a borehole's departure from the vertical Archaeology[edit]

The 46 Best-ever Freeware Utilitie Share this .COM deal with friends! Over 53 million domains registered. Copyright © 1999-2012 GoDaddy.com, LLC. All rights reserved. *One FREE .COM, .CO, .NET or .ORG with purchase of a new 12-, 24- or 36-month website builder plan. + New .COMs $7.99/yr plus 18 cents/yr ICANN fee. Top 20+ MySQL Best Practices Database operations often tend to be the main bottleneck for most web applications today. It's not only the DBA's (database administrators) that have to worry about these performance issues. We as programmers need to do our part by structuring tables properly, writing optimized queries and better code. In this article, I'll list some MySQL optimization techniques for programmers. Before we start, be aware that you can find a ton of useful MySQL scripts and utilities on Envato Market. Most MySQL servers have query caching enabled. The main problem is, it is so easy and hidden from the programmer, most of us tend to ignore it. The reason query cache does not work in the first line is the usage of the CURDATE() function. Using the EXPLAIN keyword can give you insight on what MySQL is doing to execute your query. The results of an EXPLAIN query will show you which indexes are being utilized, how the table is being scanned and sorted etc... After adding the index to the group_id field:

Printing "Hello world!" using curve fitting techniques Well, I have a computer architecture exam in six hours and can't be bothered, so I figured I would realize a lifelong dream of mine, and make a program that prints "Hello world!" using curve fitting techniques. Enlisting the help of a good friend with numerous mathematical papers under his belt (ostensibly because he could not afford a tighter belt), MATLAB and a longing for procrastination, we embarked on this perilous journey. After many, many hours of fitting and discarding data, I can finally present to you my masterpiece. This function returns the ascii ordinal for each of the letters of "Hello, world!" from math import * def f(x): return int(round(96.75 + -21.98*cos(x*1.118) + 13.29*sin(x*1.118) + -8.387*cos(2*x*1.118)\\ + 17.94*sin(2*x*1.118) + 1.265*cos(3*x*1.118) + 16.58*sin(3*x*1.118)\\ + 3.988*cos(4*x*1.118) + 8.463*sin(4*x*1.118) + 0.3583*cos(5*x*1.118)\\ + 5.878*sin(5*x*1.118))) print "".join([chr(f(x)) for x in range(12)]) and that's it!

Online Umfragen Unsere Pakete für Ihre Online-Umfrage Online-Umfragesoftwarefür Unternehmen beispielsweise für Online-Umfragen in folgenden Bereichen: - Mitarbeiterbefragung- Kundenbefragung- betriebliche Marktforschung- Webseitenbefragung Firmen-Pakete ab € 198,00 (zzgl. Firmen-Pakete für mehrere Nutzer ab € 2998,00 / Jahr (zzgl. Online-Umfragesoftwarefür Studium und Lehre - Bachelorthesis- Masterthesis- Dissertationsarbeit- Promotionsarbeit Studenten-Pakete ab € 59,00 (inkl. Hochschul-Pakete ab € 498,00 / Jahr (zzgl. Profitieren Sie von unserer Erfahrung Managed Surveys & Full Service Ergänzend zu unseren Umfragepaketen erhalten Sie von unserem kompetenten 2ask-Team optional Premium-Dienstleistungen in folgenden Bereichen: - Fragebogenerfassung- Pretest Ihrer Umfrage- Teilnehmermanagement- Durchführung der Umfrage- Statistische Auswertung- Fragebogenkonzeption- Fragebogencheck- Erstellung von Ergebnisreports- ErgebnispräsentationAngebot anfordernWeitere Informationen

Unison File Synchronizer Unison is a file-synchronization tool for OSX, Unix, and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. Unison shares a number of features with tools such as configuration management packages (CVS, PRCS, Subversion, BitKeeper, etc.), distributed filesystems (Coda, etc.), uni-directional mirroring utilities (rsync, etc.), and other synchronizers (Intellisync, Reconcile, etc). However, there are several points where it differs: Unison runs on both Windows and many flavors of Unix (Solaris, Linux, OS X, etc.) systems. Moreover, Unison works across platforms, allowing you to synchronize a Windows laptop with a Unix server, for example.

Related: