You are on page 1of 6

MySQL Download and Setup Instructions

Modified By SamePage Support on Feb 07, 2011 5:56 AM | Owner: SamePage Support
| Attachments: 0 | Comments: 0 | Version: 34
Tags : None Rating

Pre-requisites for MySQL

 SamePage requires InnoDB engine as default 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

MYSQL for Windows

If MYSQL is already installed, then you can


directly jump to STEP 4 to configure and
create samepage database.

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

1
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”.
Please follow 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';

2
 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, and follow below given steps

1. mysql –uroot –p<rootpassword>


2. mysql> drop database samepage;
3. mysql> create database samepage DEFAULT
CHARACTER SET utf8;
4. mysql> use samepage;
5. mysql> drop user 'samepage';
6. mysql> create user 'samepage' identified by
'samepage';
7. mysql> grant all privileges on *.* to
'samepage' with grant option;
8. mysql> grant super on *.* to
'samepage'@'localhost';
9. mysql> show databases;
10. 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. You will normally find a my.ini file in C:\Program Files\MySQL\MySQL
Server 5.0. The actual location will depend on where you have installed MySQL.

[mysqld]
default-storage-engine=innodb
default-character-set=utf8

3
7.2. Stop the MySQL database and restart it again.

8. In the SamePage installation please make a note the in the Database URL field enter the
database name you created:

eg: jdbc:mysql://[localhost
or IP Address of m/c where MySQL is
installed]:3306/[your_database_name]

Back to Top

MYSQL for Linux

If MYSQL is already installed, then you can


directly jump to STEP 11 to configure and create
samepage database.

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.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

4
(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”.
Please follow 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

1. mysql> drop database samepage;


2. mysql> create database samepage DEFAULT
CHARACTER SET utf8;
3. mysql> use samepage;
4. mysql> drop user 'samepage';
5. mysql> create user 'samepage' identified by
'samepage';
6. mysql> grant all privileges on *.* to
'samepage' with grant option;
7. mysql> grant super on *.* to
'samepage'@'localhost';
8. mysql> show databases;
9. mysql> exit;

5
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. You will normally find my.cnf file in /etc directory. The actual location will
depend on where you have installed MySQL.
[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.In the SamePage installation please make a note the in the Database URL field enter the
database name you created:

eg: jdbc:mysql://[localhost or IP Address of m/c


where MySQL is
installed]:3306/[your_database_name]

Back to Top

Here is the MySQL Trouble Shooting Guide if user faces issue in configuring MySQL
database for SamePage application.

You might also like