Showing entries 291 to 300 of 1065
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Uncategorized (reset)
Starting The MySQL Cluster services

Starting the services

MySQL Cluster Management Daemon (ndb_mgmd)

I prefer to start stuff manually for demos as my poor little brain likes to know what is running and how they started.

Starting the management Daemon

ndb_mgmd -f /var/lib/mysql-cluster/config.ini –configdir=/var/lib/mysql-cluster  –ndb-nodeid=1


Should give you an output similar to:

MySQL Cluster Management Server mysql-5.5.25 ndb-7.3.0

You can check its running with a ps -aux | grep mysql and check for the ndb_mgmd process

root     16868  3.2  0.6  30692  2804 ?        Ssl  13:17   0:03 ndb_mgmd -f /var/lib/mysql-cluster/config.ini --configdir=/var/lib/mysql-cluster --ndb-nodeid=1

MySQL NDB Service

As root or sudo

sudo /usr/local/mysql/bin/ndbd &

you should get the following output:

2013-09-02 …
[Read more]
Configuring MySQL Cluster (Data + Management Nodes)

 

Ok so before we go any further I guess I should draw a little picture (I hate using visio so he’s my best drawing)

 

So on ‘pi1’ we’ll be configuring the following services:

 

ndb_mgmd (MySQL Management Service Daemon) – monitors the MySQL Cluster

ndbd (Network Database Daemon) – The Network database storage engine

mysqld (MySQL client) – The client allowing you to query the database.

 

On pi2 we are just running the NDBD Daemon

 

So we need to configure the ndb_mgmd daemon. Ie tell it where the two data nodes are and how to connect. 

 

mkdir …
[Read more]
Getting MySQL Cluster compiled & Installed

So there are a few prerequisite’s to install first Update everything

apt-get update

Install libncurses and openjdk

apt-get install cmake libncurses5-dev openjdk-7-jdk

Set the swap size to 2GB sudo dphys-swapfile swapoff sudo vi /etc/dphys-swapfile  =>>  CONF_SWAPSIZE=2048 sudo dphys-swapfile setup sudo dphys-swapfile swapon

Install mysql cluster (get source from http://dev.mysql.com/downloads/cluster/7.3.html#downloads)

cd /usr/local/src
tar xzfv /home/pi/mysql-cluster-gpl-7.3.0.tar.gz
cd mysql-cluster-gpl-7.3.0

Patch MySQL to workaround a pointer type bug with ARM chipsets (get patch from http://bugs.mysql.com/file.php?id=17637)

cd sql-common
patch -l -f …
[Read more]
Raspberry Pi – Running MySQL Cluster

So my colleague Andrew Morgan did this a year or so ago, but I wanted to repeat his experiment and add a few features in order to make it a live demo. It should show how MySQL Cluster (CGE) can run even on very modest hardware..

 

The hardware has been purchased

2x Raspberry Pi’s (model b)

1x Adafruit LCD Pi Plate (16×2 LCD)

USB Hub for power

HDMI -> DVI adaptor

Netgear 100/Mbs Switch

 
Watch this space

 


So what is this all about?

So the purpose of this blog is just to share with the world for those who are interested on what i’m working on in my role of Sales Consultant for Oracle MySQL in the Uk.


MySQL forçar usuário a trocar a senha

Send to Kindle

Desde a versão 5.6.6 MySQL introduziu o habilidade the forcar usuários a trocar suas senhas.
Tu pode fazer isso digitando ALTER USER PASSWORD EXPIRE.

ALTER USER 'marcelo'@'localhost' PASSWORD EXPIRE;

Na próxima vez que marcelo tentar conectar ao MySQL via localhost, o servidor ira bloquear todos os comandos até que o usuario use SET PASSWORD;

mysql> \s
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

Para alterar a senha, e utilizar o server normalmente, basta digitar:

SET PASSWORD = PASSWORD('senha');
#Ou utilizando o hash gerado por SELECT PASSWORD('senha');
SET PASSWORD = '*AD77F56D2FD78299B87609DCC0423260B5AADB03';

Mas tome cuidado, se tu marcar a senha de um usuário como expirada, ele não poderá conectar via clientes com versão anterior a 5.6.10:

ERROR 1862 (HY000): Your password has expired. To log in you must …
[Read more]
MySQL force user change password

Send to Kindle

Since version 5.6.6 MySQL has introduced the capability to force an user to change their password.
You can archive that by issue ALTER USER PASSWORD EXPIRE statement.

ALTER USER 'marcelo'@'localhost' PASSWORD EXPIRE;

Next time marcelo tries to login from localhost it will block all statements rather then SET PASSWORD;

mysql> \s
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

To remove this block, just issue an :

SET PASSWORD = PASSWORD('pwd');
#Or use the hash received from SELECT PASSWORD('pwd');
SET PASSWORD = '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD';

But be careful, if you expire the password for an account, you won’t be able to login with any client version before 5.6.10(GA):

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

As Peter …

[Read more]
MEM in WB

In the new Workbench, click on the "Planet MySQL" shortcut, then search for my feed and find this post.

MEM

Big Data from Space: the “Herschel” telescope.

” One of the biggest challenges with any project of such a long duration is coping with change. There are many aspects to coping with change, including changes in requirements, changes in technology, vendor stability, changes in staffing and so on”–Jon Brumfitt. On May 14, 2009, the European Space Agency launched an Arianne 5 rocket [...]

“Duplicate Entry” error for key PRIMARY on UPDATE query (RBR + Triggers)

Recently, I have faced one interesting issue with Master(Active)-Master(Passive) replication (RBR + Triggers). Passive master was stopped due to “Duplicate Entry” error with update statement. It was something like this.

Last_Error: Error ‘Duplicate entry ‘29014131’ for key ‘PRIMARY” on query. Default database: ‘db’. Query: ‘UPDATE `db`.`tab1` SET `empid`=’103′, `name`=’Nilnandan’,  `address`=’India ‘, `postcode`=’D100′, `phone`=’878 515 7788’;

Interesting thing was , id (primary key column) was not updated in above update statement. Initially I was confused but when I check further, found that both servers has binglog_format = row and there are some triggers in “tab1” table which is inserting records into “tab2” (Another table).

After some investigation, found that “If under row-based replication the slave applied the triggers as …

[Read more]
Showing entries 291 to 300 of 1065
« 10 Newer Entries | 10 Older Entries »