From 3.3 onwards, SamePage is also supported on MySQL database.
Pre-requisites for MySQL
- SamePage requires InnoDB engine for MySQL because it supports transactions. The default MyISAM engine does not support transactions and hence cannot be used as the MySQL database engine for SamePage.
- SamePage requires the character set to be UTF8
MySQL setup Instructions for
Windows
(or)
Linux
The following are the steps to setup MySQL for Windows
1. Download MySQL 5.0 Community Server - Generally Available (GA) Release by clicking on
http://dev.mysql.com/downloads/mysql/5.0.html#downloads
Download the Windows Essentials (x86). The minimum build should be 5.0.45.
2. Install MySQL
2.1 Click on the mysql-essential-5.0 icon to start the installation.
2.2 The MySQL setup wizard opens up. Click on the next button to proceed.(It is recommended to retain the default options) .
2.3 Choose appropriate options in the following screens and click on 'Install' .
2.4 Click on 'Finish' to complete the installation .
3. Configure the MySQL server instance .
3.1. From the Windows menu, locate where MySQL is installed and open the MySQL server instance configuration wizard.
3.2. Choose the Reconfigure Instance option and click on next.
3.3. Choose Detailed Configuration and click on next.
3.4 Choose the Dedicated MySQL Server Machine option and click on next.
3.5 In the next screen choose the Transactional Database Only option (InnoDB -Database Engine) and click on next. Also see KnowledgeBase http://support.etouch.net/cm/wiki/?id=37080
3.6. Select the Online Transaction Processing(OLTP) option and click on next.
3.7. Enter the port number.
3.8. Select the Manual Selected Default Character Set/ Collation option and select the Character Set to be utf8
3.9. Under Modify Security Settings enter the current password and then the new password. If you are a first time user leave the current root password field blank and just enter the New root password and confirm.
3.10. Click on Finish.
4. Once the MySQL database is installed follow the below given steps for limiting account resources.
Resource limits are stored in the max_questions, max_updates, max_connections and max_user_connections columns. If your user table doesn't have these columns, it must be upgraded; see Section 5.5.8, “mysql_upgrade — Check Tables for MySQL Upgrade”.
Steps to set it to unlimited follow the below given steps:
4.1. Go to MySQL prompt
4.2. Type: use mysql;
4.3. Type: select max_questions, max_updates, max_connections, max_user_connections,user from user;
4.4. Output from Step-4.3 should have all zero’s (0) in all rows.
4.5. If the output of result is not as per Step-4.4 then type:
- UPDATE USER SET MAX_QUESTIONS = '0';
- UPDATE USER SET MAX_UPDATES = '0';
- UPDATE USER SET MAX_CONNECTIONS = '0';
- UPDATE USER SET MAX_USER_CONNECTIONS = '0';
- SET GLOBAL LOG_BIN_TRUST_FUNCTION_CREATORS = ON;
5. How to create a database in MySQL
5.1. Start MySQL service in services console.
5.2. At the command prompt, where mysql is installed and the mysql.exe command is available in the path, Run
mysql –uroot –p<rootpassword>
(You can choose the rootpassword and enter it without the brackets, eg:if your password is samepage enter mysql –uroot –psamepage)
If SamePage and MySQL database are on same machine follow steps 5.3 - 5.8
5.3. To drop database (e.g samepage)
mysql> drop database samepage;
5.4.To create a database (e.g samepage)
mysql> create database samepage DEFAULT CHARACTER SET utf8;
5.5. To use the database (e.g samepage)
mysql> use samepage
5.6. To drop an existing user (e.g samepage)
mysql> drop user 'samepage'@'localhost';
5.7. To create a user named ‘samepage’ with password ‘samepage’ (assuming such a user doesn't exists)
mysql> create user 'samepage'@'localhost' identified by 'samepage';
5.8. Now give permission to all objects in the samepage database to the user samepage:
mysql> grant all privileges on *.* to 'samepage'@'localhost' with grant option;
mysql> exit;
Note: Enter all the commands exactly as they appear here.
Note: You can replace 'localhost' in steps (5.6), (5.7) and (5.8) with the IP address
|
If SamePage and MySQL database are on different machines follow steps 5.9 - 5.17
5.9. mysql> drop database samepage;
5.10 mysql> create database samepage DEFAULT CHARACTER SET utf8;
5.11 mysql> use samepage
5.12 mysql> drop user 'samepage'@'<IP_ADDRESS_OF_MACHINE_WHERE_SAMEPAGE_IS_INSTALLED>';
5.13 mysql> create user 'samepage'@'<IP_ADDRESS_OF_MACHINE_WHERE_SAMEPAGE_IS_INSTALLED>' identified by 'samepage';
5.14 mysql> grant all privileges on *.* to 'samepage'@'<IP_ADDRESS_OF_MACHINE_WHERE_SAMEPAGE_IS_INSTALLED>' with grant option;
5.16 mysql> show databases;
5.17 mysql> exit;
6. Run the SamePage executable and select MySQL as your database.
7. If you plan to use the *.ini file to start the MySQL database then please make additional these entry for default-character-set into it and follow the below mentioned steps:
7.1. In the .ini file under [mysqld] add the following exactly as they appear here
[mysqld]
default-storage-engine=innodb
default-character-set=utf8
|
7.2. Stop the MySQL database and restart it again.
8. Start the SamePage installation and provide the user inputs. Please make a note the in the Database URL field enter the database name you created:
eg: jdbc:mysql://localhost:3306/[your_database_name]
Click here to see the instructions to install SamePage on MySQL for Windows.
Back to Top
The following are the steps to setup MySQL for Linux
Install server and client
1. MySQL for Linux can be downloaded from http://dev.mysql.com/downloads/mysql/5.0.html#linux The minimum build should be 5.0.36. Best to use build 5.0.45.
2. Install MySQL on Linux.
3. Become the superuser if you are working in your account. (Type "su root" at the prompt and give the root password).
4. Change to the directory on the Linux m/c that has the RPM download.
5. Type the following command at the prompt:
rpm -ivh "mysql_file_name.rpm"
6. Similarly you can also install the MySQL client
7. How to query the installable.
(a) rpm -qi MySQL-server-enterprise-gpl-5.0.36sp1-0.rhel4.i386.rpm
(b) rpm -qi MySQL-client-enterprise-gpl-5.0.36sp1-0.rhel4.i386.rpm
8. To remove the rpm from system
(a) rpm -e MySQL-server-enterprise-gpl-5.0.36sp1-0.rhel4.i386.rpm
(b) rpm -e MySQL-client-enterprise-gpl-5.0.36sp1-0.rhel4.i386.rpm
9. Now we'll set a password for the root user. Issue the following at the prompt.
mysqladmin -u root password samepage
10. Typing the following at the prompt starts the mysql client program.
mysql -u root -p samepage
11. Once the MySQL database is installed follow the below given steps for limiting account resources.
Resource limits are stored in the max_questions, max_updates, max_connections and max_user_connections columns. If your user table doesn't have these columns, it must be upgraded; see Section 5.5.8, “mysql_upgrade — Check Tables for MySQL Upgrade”.
Steps to set it to unlimited follow the below given steps:
11.1. Go to MySQL prompt
11.2. Type: use mysql;
11.3. Type: select max_questions, max_updates, max_connections, max_user_connections,user from user;
11.4. Output from Step-11.3 should have all zero’s (0) in all rows.
11.5. If the output of result is not as per Step-11.4 then type:
- UPDATE USER SET MAX_QUESTIONS = '0';
- UPDATE USER SET MAX_UPDATES = '0';
- UPDATE USER SET MAX_CONNECTIONS = '0';
- UPDATE USER SET MAX_USER_CONNECTIONS = '0';
- SET GLOBAL LOG_BIN_TRUST_FUNCTION_CREATORS = ON;
12. Then execute these steps one by one on the prompt
|
If SamePage and MySQL database are on same machine
(a) mysql> drop database samepage;
(b) mysql> create database samepage DEFAULT CHARACTER SET utf8;
(c) mysql> use samepage
(d) mysql> drop user 'samepage'@'localhost';
(e) mysql> create user 'samepage'@'localhost' identified by 'samepage';
(f) mysql> grant all privileges on *.* to 'samepage'@'localhost' with grant option;
(g) mysql> show databases;
(h) mysql> exit;
Note: You can replace 'localhost' in steps (d), (e) and (f) with the IP address
If SamePage and MySQL database are on different machines
(1) mysql> drop database samepage;
(2) mysql> create database samepage DEFAULT CHARACTER SET utf8;
(3) mysql> use samepage
(4) mysql> drop user 'samepage'@'<IP_ADDRESS_OF_MACHINE_WHERE_SAMEPAGE_IS_INSTALLED>';
(5) mysql> create user 'samepage'@'<IP_ADDRESS_OF_MACHINE_WHERE_SAMEPAGE_IS_INSTALLED>' identified by 'samepage';
(6) mysql> grant all privileges on *.* to 'samepage'@'<IP_ADDRESS_OF_MACHINE_WHERE_SAMEPAGE_IS_INSTALLED>' with grant option;
(7) mysql> show databases;
(8) mysql> exit;
|
|
13. If you choose to use the configuration file (*.cnf) to start the MySQL database then please make additional these entry for default-character-set into it and follow the below mentioned steps:
13.1. In the .cnf file under [mysqld] add the following exactly as they appear here
[mysqld]
default-storage-engine=innodb
default-character-set=utf8
|
13.2. Stop the MySQL database eg: /etc/rc.d/init.d/mysql stop
13.3. Restart the MySQL database eg: /etc/rc.d/init.d/mysql start
14.Start the SamePage installation and provide the user inputs. Please make a note the in the Database URL field enter the database name you created:
eg: jdbc:mysql://localhost:3306/[your_database_name]?noAccessToProcedureBodies=true&useUnicode-true&characterEncoding=UTF-8&sessionVariables=storage_engine=InnoDB
|
Click here to see the instructions to install for SamePage on MYSQL for Linux