Another post on Ansible over on the codecentric blog: Jinja2 for better Ansible playbooks and templates linked here for your convenience :)
Normally, sysbench 0.4.12 version can be installed from repositories like “apt-get install sysbench” but the newer version 0.5 is not added in any repo yet (AFAIK) so, it’s bit difficult to install it.
1. Install bzr package if it’s not installed. (i.e apt-get install bzr)
2. Download the code from branch. (i.e bzr branch lp:sysbench) https://code.launchpad.net/~sysbench-developers/sysbench/0.5
root@deb-pxc56-2:~# bzr branch lp:sysbench You have not informed bzr of your Launchpad ID, and you must do this to write to Launchpad or access private data. See "bzr help launchpad-login". Branched 122 revisions. root@deb-pxc56-2:~#
3. Before you compile code from the branch, you need some of the packages to be installed If they are not.
apt-get install automake apt-get install libtool apt-get install libmysqlclient-dev apt-get …[Read more]
It is sometimes required to get the result of a stored procedure
in a variable which can be used later or to output the
result.
To do so, we can use the "OUT" parameter mode while
defining stored procedures.
In the below section, we will be writing a stored procedure to
get the square root of a number returned in an output variable
provided by us.
Stored Procedure Definition:
Store the below stored procedure in a file named
my_sqrt.sql and save it.
DELIMITER $$
DROP PROCEDURE IF EXISTS my_sqrt$$
CREATE PROCEDURE my_sqrt(inp_number INT, OUT
op_number FLOAT)
BEGIN
SET op_number=SQRT(inp_number);
…
Actually, I found this error many times, while installing MySQL/Percona servers with MySQL Sandbox.
To resolve this issue, first, you have to make sure that, SSL is installed /update properly.
sudo apt-get update sudo apt-get install libssl1.0.0 libssl-dev
After installing this you have to create appropriate link to make it work.
For 32 bit
cd /usr/lib/ sudo ln -s libssl.so.1.0.0 libssl.so.6 sudo ln -s libcrypto.so.1.0.0 libcrypto.so.6
For 64 bit:
cd /usr/lib/x86_64-linux-gnu sudo ln -s libssl.so.1.0.0 libssl.so.6 sudo ln -s libcrypto.so.1.0.0 libcrypto.so.6
Normally this should work for CentOS and Debian too but If in Debian, it didn’t worked then do this.
sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/libssl.so.6 sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.6
I’m sure, it will work.
…
[Read more]Recently, I came through with this error. It was weird because I have never seen this error earlier.
[root@percona-pxc55-1 nilnandan]# sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=dbtest --mysql-user=msandbox --mysql-password=msandbox --mysql-socket=/tmp/mysql_sandbox5537.sock prepare sysbench 0.4.12: multi-threaded system evaluation benchmark FATAL: no database driver specified FATAL: failed to initialize database driver! [root@percona-pxc55-1 nilnandan]#
After some research, found that with Sysbench 0.4.x, we have to use option –db-driver to make it work. So I have used it and it worked.
[root@percona-pxc55-1 nilnandan]# sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=dbtest --mysql-user=msandbox --mysql-password=msandbox --mysql-socket=/tmp/mysql_sandbox5537.sock --db-driver=mysql --oltp-auto-inc=off prepare sysbench 0.4.12: multi-threaded system evaluation benchmark Creating table 'sbtest'... Creating …[Read more]
How To Install Nginx With PHP And MySQL (LEMP Stack) On CentOS 7
Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on a CentOS 6.5 server with PHP support (through PHP-FPM) and MySQL (Mariadb) support.
On the company blog I published a post about our experience with Ansible today.
It is no shoot out between different automation tools, but rather a collection of Ansible basics and our experience with it so far. Soon another post will follow about dynamically generated inventories for OpenStack virtual environments.
You can find it here: codecentric blog: Ansible: Simple, yet powerful automation.
Being a terminal fan myself, I usually find myself running
queries in the mysql client instead of a UI interface as it is
much faster. You get to see the results instantaneously.
One thing which is pretty tedious is editing a big query again
after once running it as the whole multi-line formatted query now
appears on a single line, thus reducing its readability.
But no problems, you can edit your query from a file and run the
file from your mysql client terminal as many times as you want
with as many edits.
To do so, follow the below steps:
1. Open your terminal and cd into the folder you want to
store our sample mysql file. Then save your query in a sample
file called my_query.sql
$ cd /path/to/folder
$ vim my_query.sql
Save a sample query like:
SELECT * FROM employees
WHERE type LIKE …
Well, we have all heard about the fastest php framework out
there. But how do we install it in a Ubuntu Linux machine.
Default process for any linux setup.
Steps:
1. First, we need a few packages
previously installed. To install them, issue the distro specific
command in your linux terminal.
For Ubuntu:
sudo apt-get install php5-dev php5-mysql gcc
libpcre3-dev
For Fedora:
sudo yum install php-devel php-mysqlnd gcc libtool
For RHEL:
sudo yum install php-devel php-mysql gcc libtool
For Suse:
yast2 -i php5-pear php5-devel php5-mysql gcc
Basically, here we are installing the dev tools we require to
compile and setup the Phalcon extension.
2. Get the Phalcon build using git
git …
How To Install Nginx With PHP5 (And PHP-FPM) And MySQL Support On CentOS 6.5
Nginx(pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on a CentOS 6.5 server with PHP5 support (through PHP-FPM) and MySQL support.