mercredi 13 octobre 2010

WORLD ELECTRIC GUIDE

ELECTRIC POWER AROUND THE WORLD

Check out our business phone numbers without setup fees. Business Phone Numbers can give your business an edge.
Purchase UK phone numbers with a free trial. UK Phone Number call diverts to any phone line in the world.
The table below summarizes information on the electrical systems in use in most countries of the world.
The voltages listed here are the “nominal” figures reported to be in use at most residential or commercial sites in the country or area named.  Most electrical power systems are prone to slight variations in voltage due to demand or other factors.  Many former 220 V countries have converted or are in the process of converting to  the EU standard of 230 V.  Generally, this difference is inconsequential, as most appliances are built to tolerate current a certain percentage above or below the rated voltage.  However, severe variations in current can damage electrical equipment.
The electric power frequency is shown in the number of hertz (cycles per second).  Even if voltages are similar, a 60-hertz clock or tape recorder may not function properly on 50 hertz current.  All systems described here use alternating current (AC).  The plug types listed indicate all types known to be in use in that country.  Not all areas of a country may use all types of plugs listed for that country, since there may be regional differences based on the power system in a certain area.
Finally, I've only included information that is likely to be relevant for travelers.  Just about everywhere listed here has higher voltage lines available for heavy duty appliances (not to mention commercial or industrial applications).  While this would be relevant for those moving to another country, I'm assuming most travelers will leave their clothes dryers, air conditioners and arc welders at home!   If you are interested in converting electrical units or sizing a generator try these Power Generator Calculators (for calculating generator size in kW, converting kW to kVA, kVA to kW, Volts, Amps, and more).

COUNTRY VOLTAGE FREQUENCY PLUG COMMENTS
Afghanistan 220 V 50 Hz C & F * * A UN correspondent reports C and F common in Kabul, but its likely a variety of plugs may be used around the country.  Some sources report Type D also in use.  Other reports indicate voltage variances from 160V to 280V.
Albania 220 V* 50 Hz C & F *Voltage variations common
Algeria 230 V 50 Hz C* & F *A variation of Type C with a ground post offset about 1/2-inch from center may also be found.
American Samoa 120 V 60 Hz A, B, F & I
Andorra 230 V 50 Hz C & F
Angola 220 V 50 Hz C
Anguilla 110 V 60 Hz A (maybe B)
Antigua 230 V* 60 Hz A & B *Airport area is reportedly Antigua power is 110 V.
Argentina 220 V 50 Hz C & I* *Neutral and line wires are reversed from that used in Australia and elsewhere. Click here for more.
Armenia 220 V 50 Hz Type C Electrical Outlet & F
Aruba 127 V* 60 Hz A, B & F *Lago Colony 115V
Australia 240 V 50 Hz I *Outlets typically controlled by adjacent switch. Click here for more.
Austria 230 V 50 Hz F Type C may be found, but rare.
Azerbaijan 220 V 50 Hz C, F
Azores 220 V* 50 Hz B, C, & F *Ponta Delgada 110 V; to be converted to 220 V
Bahamas 120 V 60 Hz A & B
Bahrain 230 V* 50 Hz* G *Awali 110 V, 60 Hz
Balearic Islands 220 V 50 Hz C & F
Bangladesh 220 V 50 Hz A, C, D, G & K
Barbados 115V 50 Hz A
Belarus 220 V 50 Hz C & F
Belgium 230 V 50 Hz E Notes from correspondents: a 'C' style plug can be used with 'E' and 'F' receptacles.  All double-insulated appliances are indeed fitted with a 'C' plug, and can be used in any compatible receptacle (C E F and narrow L).  Type C receptacles are prohibited in Belgium.
Belize 110/220 V 60 Hz B & G
Benin 220 V 50 Hz E
Bermuda 120 V 60 Hz A & B
Bhutan 230 V 50 Hz D, F, & G Type M plugs also identified by some sources.
Bolivia 220/230 V* 50 Hz A & C *La Paz & Viacha 115V
Bosnia 220 V 50 Hz C & F
Botswana 231V 50 Hz M Type G may be found, but rare.
Brazil 110/220 V* 60 Hz A & B, C *127 V found in states of Bahia, Paraná (including Curitiba), Rio de Janeiro, São Paulo and Minas Gerais (though 220 V may be found in some hotels).  Other areas are 220 V only, with the exception of Fortaleza (240 V).  Outlets (click for more) are often a combination of type A and C and can accept either type plug.
Brunei 240 V 50 Hz G
Bulgaria 230 V 50 Hz C* & F* *Outlets are reported as type F, though both type C and F plugs may be encountered.
Burkina Faso 220 V 50 Hz C & E
Burundi 220 V 50 Hz C & E
Cambodia 230 V 50 Hz A & C* *Some outlets are a combination of type A and C and can accept either type plug.   Plug G may be found in some hotels.
Cameroon 220 V 50 Hz C, E
Canada 120 V 60 Hz A & B
Canary Islands 220 V 50 Hz C, E, & L Type L plugs/outlets may have different pin spacing.  The smaller and closer pins are for a rated current of 10 A, the bigger and wider pins are for a rated current of 16 A. 
Cape Verde 220 V 50 Hz C & F
Cayman Islands 120 V 60 Hz A & B
Central African Republic 220 V 50 Hz C & E
Chad 220 V 50 Hz D, E & F
Channel Islands 230 V 50 Hz G
Chile 220 V 50 Hz C & L
China, People's Republic of 220 V 50 Hz A, I, G The "official" plug type is like type A but slightly shorter and without holes in blades.  Type A and I outlets are common, and Type G might also be found.  Click here for photos and more info.
Colombia 110 V 60 Hz A & B
Comoros 220 V 50 Hz C & E
Congo, People's Rep. of 230 V 50 Hz C & E
Congo, Dem. Rep. of (former Zaire) 220 V 50 Hz C & D
Cook Islands 240 V 50 Hz I
Costa Rica 120 V 60 Hz A & B
Côte d'Ivoire
(Ivory Coast)
220 V 50 Hz C & E
Croatia 230 V 50 Hz C & F
Cuba 110/220 V 60 Hz A & B, C
F & L
Most older hotels 110 V.  Some newer hotels 220 V.  Some outlets are a combination of type A and C and can accept either type plug.
Cyprus 240 V 50 Hz G
Czech Republic 230 V 50 Hz E
Denmark 230 V 50 Hz C & K Denmark's connectors have slight differences from those used elsewhere.  While pin diameter and spacing is standard, outlets may have different housing depths which could interfere with standard adaptors -- one report says this is due to "childproofing."  Also, Plug C fits into K-type outlets (but not vice versa).
Djibouti 220 V 50 Hz C & E
Dominica 230 V 50 Hz D & G
Dominican Republic 110 V 60 Hz A Type J may exist in some hotels.
East Timor 220 V 50 Hz C, E, F, I, A UN correspondent reports "power is poor in the country with frequent brownouts and blackouts.  I suspect that surges are frequent as we go through a lot of surge-protecting power bars."  Further he reports than Type I is common as much construction is done by Australians; type C is common in building built during Indonesian occupation; type E is less common; type F is common in offices but not hotels.
Ecuador 120-127 V 60 Hz A & B
Egypt 220 V 50 Hz C
El Salvador 115V 60 Hz A & B
England (See United Kingdom)
Equatorial Guinea 220 V* 50 Hz C & E *Voltage varies between 150 & 175V with frequent outages
Eritrea 230 V 50 Hz C
Estonia 230 V 50 Hz F Type C may be found in older buildings.  Type E plugs may work in either C or F type outlets.
Ethiopia 220 V 50 Hz D, J, & L
Faeroe Islands 220 V 50 Hz C & K
Falkland Islands 240 V 50 Hz G
Fiji 240 V 50 Hz I
Finland 230 V 50 Hz CF
France 230 V 50 Hz E Type C plugs  may be found on some appliances, and will fit the Type E outlet.  Type C outlets may be found in older buildings.  Type A may be found in older buildings but is illegal.
French Guiana 220 V 50 Hz C, & E
Gaza 230 V 50 Hz H  
Gabon 220 V 50 Hz C
Gambia 230 V 50 Hz G
Georgia 220 V 50 Hz C
Germany 230 V 50 Hz C & F
Ghana 230 V 50 Hz D & G
Gibraltar 240 V 50 Hz C & G
Great Britain (See United Kingdom)
Greece 220 V 50 Hz C, D, E & F
Greenland 220 V 50 Hz C & K
Grenada (Windward Is.) 230 V 50 Hz G
Guadeloupe 230 V 50 Hz C, D, & E
Guam 110 V 60 Hz A & B
Guatemala 120 V 60 Hz A & B, G, & I
Guinea 220 V 50 Hz C, F & K
Guinea-Bissau 220 V 50 Hz C
Guyana 240 V* 60 Hz* A B, D & G *Inside the capital city of Georgetown, both 120 V and 240 V at either 50 or 60 Hz are found, depending on the part of the city (50 Hz most common).  Actual voltage may vary from area to area.
Haiti 110 V 60 Hz A & B
Honduras 110 V 60 Hz A & B
Hong Kong 220 V* 50 Hz G, M Type M replaced by Type G but still found.
Hungary 230 V 50 Hz C & F
Iceland 220 V 50 Hz C & F
India 230 V 50 Hz C & D Click here for photos and more info.
Indonesia 127/230 V* 50 Hz C, F & G *Conversion to 230 V in progress; complete in principal cities
Iran 230 V 50 Hz C
Iraq 230 V 50 Hz C, D, & G
Ireland (Eire) 230 50 Hz G Type D once common and may be occasionally found.
Isle of Man 240 V 50 Hz C & G
Israel 220 V 50 Hz C
Italy 230 V 50 Hz C, F & L Type L plugs/outlets may have different pin spacing.  The smaller and closer pins are for a rated current of 10 A, the bigger and wider pins are for a rated current of 16 A.  Both kinds are currently used and comply to the relevant Italian (CEI) regulations.  Some outlets have overlapping holes to accept either older or newer types.
Ivory Coast (See Côte d'Ivoire)
Jamaica 110 V 50 Hz A & B
Japan 100 V 50/60 Hz* A & B *Eastern Japan 50 Hz (Tokyo, Kawasaki, Sapporo, Yokohoma, and Sendai); Western Japan 60 Hz (Osaka, Kyoto, Nagoya, Hiroshima)
Jordan 230 V 50 Hz D, F, G & J* *Type C may be found in some hotels.
Kenya 240 V 50 Hz  G  
Kazakhstan 220 V 50 Hz C
Kiribati 240 V 50 Hz I
Korea, South 220 V 60 Hz  C & F* *Type F likely to be found in offices and hotels.  110 V power with plugs A & B was previously used but is being phased out.  Older buildings may still have this, and some hotels offer both 110 V and 220 V service.
Kuwait 240 V 50 Hz D* & G *Type D primarily used for 15A service, Type G primarily for 13A service..
Laos 230 V 50 Hz A B, C, E & F
Latvia 220 V 50 Hz C & F
Lebanon 110/220 V 50 Hz A, B, C, D & G
Lesotho 220 V 50 Hz M
Liberia 120 V 60 Hz A & B
Libya 127 V* 50 Hz D & L *Barce, Benghazi, Derna, Sebha & Tobruk 230 V
Lithuania 220 V 50 Hz C & F
Liechtenstein 230 V 50 Hz J
Luxembourg 220 V 50 Hz C & F
Macau 220 V 50 Hz   D & G
Macedonia 220 V 50 Hz C & F
Madagascar 220 V 50 Hz C & E
Madeira 220 V 50 Hz C & F
Malawi 230 V 50 Hz G
Malaysia 240 V 50 Hz G
Maldives 230 V 50 Hz A, D, G, J, K & L
Mali 220 V 50 Hz C & E
Malta 240 V 50 Hz G
Martinique 220 V 50 Hz C, D, & E
Mauritania 220 V 50 Hz C
Mauritius 230 V 50 Hz C & G
Mexico 127 V 60 Hz A & B
Micronesia (Federal States of) 120 V 60 Hz A & B
Monaco 127/220 V 50 Hz C, D, E  F
Mongolia 220 V  50 Hz C & E
Montenegro 220 V 50 Hz C & F
Montserrat (Leeward Is.) 230 V 60 Hz A & B
Morocco 127/220 V* 50 Hz C & E *Conversion to 220 V only underway
Mozambique 220 V 50 Hz C, F & M* *Type M found especially near the border with South Africa, including the capitol, Maputo.
Myanmar (formerly Burma) 230 V 50 Hz C, D, F & G* Type G* found primarily in better hotels.  Also,  many of major
hotels chains are said to have multipurpose outlets, which will take Australian 3-pin plugs and perhaps other types.
Namibia 220 V 50 Hz M
Nauru 240 V 50 Hz I
Nepal 230 V 50 Hz C & D
Netherlands 230 V 50 Hz C & F
Netherlands Antilles 127/220 V* 50 Hz A, B, & F *St. Martin 120 V 60 Hz; Saba &(St. Eustatius 110 V 60 Hz A, maybe B
New Caledonia 220 V 50 Hz F
New Zealand 230 V 50 Hz I
Nicaragua 120 V 60 Hz A
Niger 220 V 50 Hz A, B, C, D, E & F
Nigeria 240 V 50 Hz D & G
Northern Ireland (see United Kingdom)
Norway 230 V 50 Hz C & F
Okinawa 100 V* 60 Hz A, B & I *Military facilities 120 V
Oman 240 V* 50 Hz G *Voltage variations common
Pakistan 220 V 50 Hz C & D
Palmyra Atoll 120 V 60 Hz A & B
Panama 110 V* 60 Hz A, B *Panama City 120 V
Papua New Guinea 240 V 50 Hz I
Paraguay 220 V 50 Hz C
Peru 220 V* 60 Hz* A, B & C *Talara 110/220 V; Arequipa 50 Hz
Philippines 220 V 60 Hz A, B, C  Type A most commonly found.
Poland 230 V 50 Hz C & E
Portugal 230 V 50 Hz C & F
Puerto Rico 120 V 60 Hz A & B
Qatar 240 V 50 Hz D & G
Réunion Island 220 V  50 Hz E
Romania 230 V 50 Hz C & F
Russia 220 V 50 Hz F & C Type F used in new construction.  Type C common in older structures.
Rwanda 230 V 50 Hz C & J
St. Kitts and Nevis (Leeward Is.) 230 V 60 Hz D & G
St. Lucia (Windward Is.) 240 V 50 Hz G
St. Vincent (Windward Is.) 230 V 50 Hz A, C, E, G, I & K
Samoa 230 V 50 Hz I
Saudi Arabia 127/220 V 60 Hz A, B, F & G
Scotland (See United Kingdom)
Senegal 230 V 50 Hz C, D, E & K
Serbia 220 V 50 Hz C & F
Seychelles 240 V 50 Hz G
Sierra Leone 230 V 50 Hz D & G
Singapore 230 V 50 Hz G Type A adaptors are widely available from shops as an extension set of 2 to 5 sets of sockets; most commonly used for audio and video equipment. 
Slovak Republic 230 V 50 Hz E
Slovenia 220 V 50 Hz C & F
Somalia 220 V* 50 Hz C *Berbera 230 V; Merca 110/220 V
South Africa 220/230 V* 50 Hz M** *Grahamstad & Port Elizabeth 250V; also found in King Williams
** Types C & G can also be found in some areas.
Spain 230 V 50 Hz C & F A correspondent reports that in Barcelona's Barrio Gothic, voltage is 120 V 60 Hz using Types C & F plugs.  Step up transformers are required to use typical European devices.
Sri Lanka 230 V 50 Hz D
Sudan 230 V 50 Hz C & D
Suriname 127 V 60 Hz C & F
Swaziland 230 V 50 Hz M
Sweden 230 V 50 Hz C & F
Switzerland 230 V 50 Hz J Type C plugs  are common on appliances, and will fit the Type J outlet.
Syria 220 V 50 Hz C, E, & L
Tahiti 220 V 60 Hz A, B, E All electrical outlets protected by ground fault circuit interruptors (GFCI).
Tajikistan 220 V 50 Hz C & I
Taiwan 110 V 60 Hz A, B
Tanzania 230 V 50 Hz D & G
Thailand 220 V 50 Hz A & C* *Some outlets are a combination of type A and C and can accept either type plug.
Togo 220 V* 50 Hz C *Lome 127 V
Tonga 240 V 50 Hz I
Trinidad & Tobago 115V 60 Hz A & B
Tunisia 230 V 50 Hz CE 
Turkey 230 V 50 Hz CF
Turkmenistan 220 V 50 Hz B & F
Uganda 240 V 50 Hz G
Ukraine 220 V 50 Hz C
United Arab Emirates 220 V* 50 Hz G
United Kingdom 230 V* 50 Hz G *Outlets typically controlled by adjacent switch.
Though nominal voltage has been officially changed to 230 V, 240 V is within tolerances and commonly found. 
United States of America 120 V 60 Hz A & B
Uruguay 220 V 50 Hz C, F, I* & L Type F becoming more common as a result of computer use.  *Neutral and line wires are reversed from that used in Australia and elsewhere. 
Uzbekistan 220 V 50 Hz C & I
Vanuatu 230 V 50 Hz I Some Type G may linger from British Colonial period, but are a rarity.
Venezuela 120 V 60 Hz A & B
Vietnam 127/220 V* 50 Hz A, C & G *To be standardized at 220 V.  Type G found in newer hotels, primarily those built by Singaporean and Hong Kong developers.
Virgin Islands (British and U.S.) 115V 60 Hz A & B
Wales (See United Kingdom)
Yemen, Rep. of 220/230 V 50 Hz A, D & G
Zambia 230 V 50 Hz C, D & G
Zimbabwe 220 V 50 Hz D & G

lundi 11 octobre 2010

MYSQL -- Commandes de base

To login (from unix shell) use -h only if needed.

# [mysql dir]/bin/mysql -h hostname -u root -p

Create a database on the sql server.

mysql> create database [databasename];

List all databases on the sql server.

mysql> show databases;

Switch to a database.

mysql> use [db name];

To see all the tables in the db.

mysql> show tables;

To see database's field formats.

mysql> describe [table name];

To delete a db.

mysql> drop database [database name];

To delete a table.

mysql> drop table [table name];

Show all data in a table.

mysql> SELECT * FROM [table name];

Returns the columns and column information pertaining to the designated table.

mysql> show columns from [table name];

Show certain selected rows with the value "whatever".

mysql> SELECT * FROM [table name] WHERE [field name] = "whatever";

Show all records containing the name "Bob" AND the phone number '3444444'.

mysql> SELECT * FROM [table name] WHERE name = "Bob" AND phone_number = '3444444';

Show all records not containing the name "Bob" AND the phone number '3444444' order by the phone_number field.

mysql> SELECT * FROM [table name] WHERE name != "Bob" AND phone_number = '3444444' order by phone_number;

Show all records starting with the letters 'bob' AND the phone number '3444444'.

mysql> SELECT * FROM [table name] WHERE name like "Bob%" AND phone_number = '3444444';

Show all records starting with the letters 'bob' AND the phone number '3444444' limit to records 1 through 5.

mysql> SELECT * FROM [table name] WHERE name like "Bob%" AND phone_number = '3444444' limit 1,5;

Use a regular expression to find records. Use "REGEXP BINARY" to force case-sensitivity. This finds any record beginning with a.

mysql> SELECT * FROM [table name] WHERE rec RLIKE "^a";

Show unique records.

mysql> SELECT DISTINCT [column name] FROM [table name];

Show selected records sorted in an ascending (asc) or descending (desc).

mysql> SELECT [col1],[col2] FROM [table name] ORDER BY [col2] DESC;

Return number of rows.

mysql> SELECT COUNT(*) FROM [table name];

Sum column.

mysql> SELECT SUM(*) FROM [table name];

Join tables on common columns.

mysql> select lookup.illustrationid, lookup.personid,person.birthday from lookup left join person on lookup.personid=person.personid=statement to join birthday in person table with primary illustration id;

Creating a new user. Login as root. Switch to the MySQL db. Make the user. Update privs.

# mysql -u root -p
mysql> use mysql;
mysql> INSERT INTO user (Host,User,Password) VALUES('%','username',PASSWORD('password'));
mysql> flush privileges;

Change a users password from unix shell.

# [mysql dir]/bin/mysqladmin -u username -h hostname.blah.org -p password 'new-password'

Change a users password from MySQL prompt. Login as root. Set the password. Update privs.

# mysql -u root -p
mysql> SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere');
mysql> flush privileges;

Recover a MySQL root password. Stop the MySQL server process. Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server.

# /etc/init.d/mysql stop
# mysqld_safe --skip-grant-tables &
# mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql stop
# /etc/init.d/mysql start

Set a root password if there is on root password.

# mysqladmin -u root password newpassword

Update a root password.

# mysqladmin -u root -p oldpassword newpassword

Allow the user "bob" to connect to the server from localhost using the password "passwd". Login as root. Switch to the MySQL db. Give privs. Update privs.

# mysql -u root -p
mysql> use mysql;
mysql> grant usage on *.* to bob@localhost identified by 'passwd';
mysql> flush privileges;

Give user privilages for a db. Login as root. Switch to the MySQL db. Grant privs. Update privs.

# mysql -u root -p
mysql> use mysql;
mysql> INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES ('%','databasename','username','Y','Y','Y','Y','Y','N');
mysql> flush privileges;

or

mysql> grant all privileges on databasename.* to username@localhost;
mysql> flush privileges;

To update info already in a table.

mysql> UPDATE [table name] SET Select_priv = 'Y',Insert_priv = 'Y',Update_priv = 'Y' where [field name] = 'user';

Delete a row(s) from a table.

mysql> DELETE from [table name] where [field name] = 'whatever';

Update database permissions/privilages.

mysql> flush privileges;

Delete a column.

mysql> alter table [table name] drop column [column name];

Add a new column to db.

mysql> alter table [table name] add column [new column name] varchar (20);

Change column name.

mysql> alter table [table name] change [old column name] [new column name] varchar (50);

Make a unique column so you get no dupes.

mysql> alter table [table name] add unique ([column name]);

Make a column bigger.

mysql> alter table [table name] modify [column name] VARCHAR(3);

Delete unique from table.

mysql> alter table [table name] drop index [colmn name];

Load a CSV file into a table.

mysql> LOAD DATA INFILE '/tmp/filename.csv' replace INTO TABLE [table name] FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,field3);

Dump all databases for backup. Backup file is sql commands to recreate all db's.

# [mysql dir]/bin/mysqldump -u root -ppassword --opt >/tmp/alldatabases.sql

Dump one database for backup.

# [mysql dir]/bin/mysqldump -u username -ppassword --databases databasename >/tmp/databasename.sql

Dump a table from a database.

# [mysql dir]/bin/mysqldump -c -u username -ppassword databasename tablename > /tmp/databasename.tablename.sql

Restore database (or database table) from backup.

# [mysql dir]/bin/mysql -u username -ppassword databasename < /tmp/databasename.sql

Create Table Example 1.

mysql> CREATE TABLE [table name] (firstname VARCHAR(20), middleinitial VARCHAR(3), lastname VARCHAR(35),suffix VARCHAR(3),officeid VARCHAR(10),userid VARCHAR(15),username VARCHAR(8),email VARCHAR(35),phone VARCHAR(25), groups VARCHAR(15),datestamp DATE,timestamp time,pgpemail VARCHAR(255));

Create Table Example 2.

mysql> create table [table name] (personid int(50) not null auto_increment primary key,firstname varchar(35),middlename varchar(50),lastnamevarchar(50) default 'bato');

Manage Users : 

To show the users in a MySQL database, first log into your MySQL server as an administrative user, then run this MySQL query:
select * from mysql.user;
This MySQL users query shows a large listing of MySQL user information, including MySQL permission information, so you may want to trim down some of the fields to display. You can get a listing of the fields in the mysql.user table by running this command:
desc mysql.user;
On my current MySQL server this shows the following 37 columns of information, as shown here:
mysql> desc mysql.user;
+-----------------------+-----------------------------------+------+-----+---------+-------+
| Field                 | Type                              | Null | Key | Default | Extra |
+-----------------------+-----------------------------------+------+-----+---------+-------+
| Host                  | char(60)                          | NO   | PRI |         |       | 
| User                  | char(16)                          | NO   | PRI |         |       | 
| Password              | char(41)                          | NO   |     |         |       | 
| Select_priv           | enum('N','Y')                     | NO   |     | N       |       | 
| Insert_priv           | enum('N','Y')                     | NO   |     | N       |       | 
| Update_priv           | enum('N','Y')                     | NO   |     | N       |       | 
| Delete_priv           | enum('N','Y')                     | NO   |     | N       |       | 
| Create_priv           | enum('N','Y')                     | NO   |     | N       |       | 
| Drop_priv             | enum('N','Y')                     | NO   |     | N       |       | 
| Reload_priv           | enum('N','Y')                     | NO   |     | N       |       | 
| Shutdown_priv         | enum('N','Y')                     | NO   |     | N       |       | 
| Process_priv          | enum('N','Y')                     | NO   |     | N       |       | 
| File_priv             | enum('N','Y')                     | NO   |     | N       |       | 
| Grant_priv            | enum('N','Y')                     | NO   |     | N       |       | 
| References_priv       | enum('N','Y')                     | NO   |     | N       |       | 
| Index_priv            | enum('N','Y')                     | NO   |     | N       |       | 
| Alter_priv            | enum('N','Y')                     | NO   |     | N       |       | 
| Show_db_priv          | enum('N','Y')                     | NO   |     | N       |       | 
| Super_priv            | enum('N','Y')                     | NO   |     | N       |       | 
| Create_tmp_table_priv | enum('N','Y')                     | NO   |     | N       |       | 
| Lock_tables_priv      | enum('N','Y')                     | NO   |     | N       |       | 
| Execute_priv          | enum('N','Y')                     | NO   |     | N       |       | 
| Repl_slave_priv       | enum('N','Y')                     | NO   |     | N       |       | 
| Repl_client_priv      | enum('N','Y')                     | NO   |     | N       |       | 
| Create_view_priv      | enum('N','Y')                     | NO   |     | N       |       | 
| Show_view_priv        | enum('N','Y')                     | NO   |     | N       |       | 
| Create_routine_priv   | enum('N','Y')                     | NO   |     | N       |       | 
| Alter_routine_priv    | enum('N','Y')                     | NO   |     | N       |       | 
| Create_user_priv      | enum('N','Y')                     | NO   |     | N       |       | 
| ssl_type              | enum('','ANY','X509','SPECIFIED') | NO   |     |         |       | 
| ssl_cipher            | blob                              | NO   |     | NULL    |       | 
| x509_issuer           | blob                              | NO   |     | NULL    |       | 
| x509_subject          | blob                              | NO   |     | NULL    |       | 
| max_questions         | int(11) unsigned                  | NO   |     | 0       |       | 
| max_updates           | int(11) unsigned                  | NO   |     | 0       |       | 
| max_connections       | int(11) unsigned                  | NO   |     | 0       |       | 
| max_user_connections  | int(11) unsigned                  | NO   |     | 0       |       | 
+-----------------------+-----------------------------------+------+-----+---------+-------+
37 rows in set (0.10 sec)

For most cases you'll probably want to limit your MySQL users information to a few important columns, something like this:

select host, user, password from mysql.user;
Sources : 

Transférer cacti vers un autre serveur

- Old Server:

1. Stop Cacti from running by removing or moving the crontab job from /etc/cron.d. I just moved it to root's home area in case I need it again.

2. Backup the cacti database:
mysqldump -u root -p cacti > cacti_export.sql
(-u username -p prompt me for the password database_name > sql file)

3. Copy the cacti_export.sql file to the new server.

4. Copy the rra, scripts, and any other modified files to the corresponding directory on the new server.
scp -r /var/www/cacti/rra/* root@violet:/var/www/html/cacti/rra/


- New Server:

1. Create the cacti databases, import old database, and set appropriate permissions.

mysqladmin --user=root create cacti
mysql -u root -p cacti < /root/cacti_export.sql mysql -u root -p cacti mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'the password of cactiuser';
mysql> flush privileges;
mysql> quit;


2. Verify the permissions are set correctly on the rra/ and log/ directories in cacti's home area.
chown -R cactiuser:cactiuser rra/ log/
It never hurts to make sure, especially after you have copied files from another server.

3. I then go to the log/ directory and tail -f the cacti.log and watch for the next crontab job to run and hopefully see good results.

I think that is all I had to do, but this is the best I can remember. If you have SNMP access lists on your devices or any firewall rules in your path, always make sure to change them to reflect the new server.

EXTRAS:

I install the cacti plugin architecture, www.cactiusers.org, primarily the thold plugin. The steps are easy to follow, so I leave you to follow their documentation.


Source : http://cainsplace.blogspot.com/2007/05/moving-cacti-from-one-linux-server-to.html