In this post, we are going to explore the way of how to import a .csv file through the command line in dbForge Studio for MySQL. You will not have to waste your valuable time on manually specifying properties each time you need to create a new MySQL table. With this option, you can forget […]
5 Older Entries »
This is not a comprehensive review, nor an user guide. It's a step-by-step account of my initial impressions while trying the new MySQL XProtocol and the document store capabilities. In fact, I am barely scratching the surface here: more articles will come as time allows.
MySQL 5.7 has been GA for several months, as it was released in October 2015. Among the many features and improvements, I was surprised to see the MySQL team emphasizing the JSON data type. While it is an interesting feature per se, I failed to see the reason why so many articles and conference talks were focused around this single feature. Everything became clear when, with the release of MySQL 5.7.12, the MySQL team announced a new release model.
In …[Read more]
I was on the quest of searching the Holy Grail of Go programming, and I found something, which I doubt that it is, but close enough – for the first sight.
I have several problems with GO, first, that I write my code on an OSX box, and I’ll run the programs on Linux hosts, so I have to solve the cross compilation; my second problem with Go, that I don’t really like the “There is a GO project folder, and all the GO projects are relying on” approach. It makes using GitHub painful.
The first problem of mine is easily achievable since GO 1.5: we only need a GOOS environment variable and we can compile to different OS-es (see more at Dave Cheney: http://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5) easily.
The second problem is easily solvable too, just we have to start using the GOPATH variable for every GO project we have.
I don’t really want to use any external dependencies, so I decided to …[Read more]
I was thinking if my work environment would be interesting or not, but I decided ‘yes’ – because I always like reading about others work env.
I am working with Linux/UNIX for more than 15 years now, and I have tried a lot of cool tools, but at the end, I always found myself using the same apps in terminal.
I like the unix philosophy about Do One Thing and Do It Well. I never really use big, bloated software, I like to use my editor for editing files, and my git client to use git. That’s simple.
Normally I work from a mac, but I have an installed linux based backup environment too, on a remote server which can be accessed via ssh.
The basic tool for me is iTerm2. The main features I use are split pane (cmd+D vertical, cmd+shift+D horiontal) and broadcast input (cmd+shift+I). I also like that it can be switched to fullscreen with cmd+enter. In …[Read more]
If you work with command line and know your SQL, q is a great tool to use:
q allows you to query your text files or standard input with SQL. You can:
SELECT c1, COUNT(*) FROM /home/shlomi/tmp/my_file.csv GROUP BY c1
And you can:
SELECT all.c2 FROM /tmp/all_engines.txt AS all LEFT JOIN /tmp/innodb_engines.txt AS inno USING (c1, c2) WHERE inno.c3 IS NULL
And you can also combine with your favourite shell commands and tools:
grep "my_term" /tmp/my_file.txt | q "SELECT c4 FROM - JOIN /home/shlomi/static.txt USING (c1)" | xargs touch
Some of q's functionality (and indeed, SQL functionality) can be found in command line tools. You can use grep for pseudo WHERE filtering, or cut for projecting, but you can only get so far with …[Read more]
Cherry-picking from the Change log:
- Added option
--bind_addressto complement the effects of
- The script 'enable_gtid' (for MySQL 5.6 +) now is durable. Previously the changes did not survive a restart.
- Now you can install MariaDB with its bizarre version '10.0'
- It also works well with MySQL 5.7. A bug prevented the creation of 'enable_gtid', but it …
There are mistakes that drive you crazy when you try to understand what went wrong.
One of the most annoying and hard to catch was this, apparently harmless line:
tungsten-sandbox -m 5.5.24 --topology all-masters -n 2 -p 7300 -l 12300 -r 10300 –t $HOME/mm -d tsb-mm
The person reporting the error told me that the installation directory (indicated by "-t") was not taken into account.
I usually debug by examples, so I copied the line, and pasted it into one of my servers. Sure enough, the application did not take trat option into account. The installation kept happening in the default directory.
I knew that I had done a good job at making the application configurable, but I checked the code nonetheless. The only place where the default directory is mentioned is when the related variable is initialized. Throughout the code, there are no literal values used for this purpose. And yet, the …[Read more]
Students in my training classes usually prefer to use some kind of visual editor for MySQL. Typically this would be the software they're using at work. Sometimes they just bring over their laptops with the software installed. Or they would use MySQL Workbench, which is what I usually have pre-installed on their desktops.
I see MySQL Workbench, SQLyog, Toad for MySQL, or several more.
I always humbly suggest they close down their software and open up a command line.
It isn't fancy. It may not even be convenient (especially on Windows, in my opinion). And repeating your last command with a minor modification requires a lot of key stroking. Or you would copy+paste from some text editor. Most students will give it a shot, then go back to their favorite editor.
Well, again and again I reach the same conclusion:
Visual editors are not as trustworthy as the command line.
Time and again …[Read more]
Oracle Open World 2011 is approaching. MySQL is very well
represented. Sheeri has put together a simple table of all
the MySQL sessions at OOW, which is more handy
than the Oracle schedule. I will be speaking in three
sessions on Sunday, October 2nd.
I have been doing quite a lot of benchmarking recently.
I needed to find a safe way of measuring the time spend by the database doing a long task, like catching up on a huge backlog of accumulated replication updates. The problem with measuring this event is that I can record when it starts, but I can't easily detect when it finishes. My initial approach was to monitor the database and count the tables rows to see when the task was done, but I ended up affecting the task performance with my additional queries. So I thought of another method.
Since I had control on what was sent from the master to the slave, I used the following:
The initial time is calculated as the minimum creation time of the databases that I know are created during the exercise. Let's say that I had 5 databases named from db1 to db5:
set @START = (select min(create_time) from information_schema.tables where table_schema like "db%")
5 Older Entries »